|
|
|
| 02115 Java Programming | ||
| Autumn 2011 |
The lecture plan may be updated here through
the semester.
The lecture plan only gives you an overview of the
subjects covered by references to the textbook
''Objects First with Java''. Regarding application of the other
course textbook ''Java Precisely'' and details on what to read, prepare and
exercise please consult the appropriate week plan available from
the link Weekly Work and Assignments
All references below to chapters, sections and
pages are to the fourth edition of the ''Objects First with Java''
textbook.
References to our second textbook "Java Precisely" has to be looked up in the single week plans.
| Week | Date | Text | Description/Keywords |
|---|---|---|---|
| 1 | Aug.30 | Chapter 1: 1.1-1.14; p.3-17
Chapter 2:
Chapter 3: |
Objects, classes, class definitions and object interaction
Objects and classes; Creating objects, The Ticket
Machine example; Examining a class definition; Fields,
constructors, and methods; Passing
data via parameters; Assignment; Accessor methods; Mutator
methods; Printing,
The Clock example; Abstraction and modularization; Class diagrams,
object diagrams; Primitive types, object types;
The ClockDisplay example, logic operators, String
concatenation, the modulo operator |
| 2 | Sept. 6 | Chapter 4: 4.1-4.13; p.87-127 Chapter 5: 5.1-5.14; p.128-168 |
Grouping objects, library classes and documentation
Grouping objects in flexible-size collections; The personal
Notebook example, using
Documentation for library classes; The TechSupport
system; Reading class documentation, interfaces versus
implementation, using library-class methods, checking
string equality, |
| 3 | Sept.13 | Chapter 6: 6.1-6.13; p.169-200 Chapter 7: 7.1-7.16; p.201-241 |
Well-behaved objects and designing classes Testing and debugging; Unit testing, using inspectors, positive versus negative testing; Test automation, regression testing, automated checking of test results, recording a test, fixtures; Modularization and interfaces; A debugging scenario; Commenting and style; Manual walkthroughs, a high-level walkthrough, checking state with a walkthrough, verbal walkthroughs; Print statements, turning debugging information on or off; Choosing a test strategy; Debuggers; Putting the techniques into practice
The world-of-zuul game example; Introduction to coupling and
cohesion; Code duplication; Making extensions, finding the
relevant source code; Coupling, using encapsulation to reduce
coupling; Responsibility-driven design, responsibilities and
coupling; Localizing change; Implicit coupling; Thinking
ahead; Cohesion, cohesion of methods, cohesion of classes,
cohesion for readability, cohesion for reuse; Refactoring,
refactoring and testing, an example of refactoring;
Refactoring for language independance, enumerated types,
further decoupling of the command interface; Design
guidelines; Executing without BlueJ, class methods, the main
method, limitations of class methods |
| 4 | Sept.20 | Chapter 8: 8.1-8.10; p.245-275 Chapter 9: 9.1-9.12; p.276-299 |
Improving structure with inheritance
The DoME example, its classes and objects, its source code, the
application; Using inheritance; Inheritance hierarchies;
Inheritance in Java, inheritance and access rights,
inheritance and initialization; Adding other item types to the
DoME example; Advantages of inheritance (so far); Subtyping,
subclasses and subtypes, subtyping and assignment, subtyping
and parameter passing, polymorphic variables, casting; The
The problem: DoME's print method; Static type and
dynamic type; Overriding; Dynamic method lookup; Super call in
methods; Method polymorphism; Object methods:
|
| 5 | Sept.27 | Chapter 10: 10.1-10.8; p.300-335 Chapter 12: 12.1-12.6; p.381-406 |
Further abstraction techniques and handling errors (1st part)
Simulations; The foxes-and-rabbits simulation,
the foxes-and-rabbits project,
the
The address-book project; Defensive programming, client-server
interaction, argument checking; Server error reporting,
notifying the user, notifying the client object;
Exception-throwing principles, throwing an exception,
exception classes, the effect of an exception, unchecked
exceptions, preventing object creation; Exception handling,
checked exceptions: the |
| 6 | Oct. 4 |
Chapter 12: 12.7-12.10; p.407-423 Chapter 13: 13.1-13.8; p.424-443 |
Handling errors (2nd part) and designing applications
Using assertions,
internal consistency checks, the |
| 7 | Oct.11 | Chapter 14: 14.1-14.6; p.444-464 | A case study
The case study, the problem description; Analysis and design,
discovering classes, using CRC cards, scenarios; Class design,
designing class interfaces, collaborators, the outline
implementation, testing, some remaining issues;
Iterativ development, development steps, a first stage,
testing the first stage, a later stage of development,
further ideas for development, reuse; Another example;
Taking things further |
| 8 | Oct.25 | No lectures | Mandatory Assignment - 1st part (2) Four hours exercise session |
| 9 | Nov. 1 | No lectures | Mandatory Assignment - 1st part (3) Four hours exercise session |
| 10 | Nov. 8 | Chapter 11: 11.1-11.5; p.337-364 | Building graphical user interfaces Introduction; Components, layout, and event handling; AWT and Swing; The ImageViewer example, First experiments: creating a frame, adding simple components, adding menus, event handling, centralized receipt of events, inner classe, anonymous inner classes, summary of key GUI elements; ImageViewer 1.0: the first complete version, image processing classes, adding the image, layout, nested containers, image filters, dialogs, summary of layout management |
| 11 | Nov.15 | Chapter 11: 11.6-11.10; p.365-380 | Building graphical user interfaces ImageViewer 2.0: improving program structure; ImageViewer 3.0: more interface components, buttons, borders; Further extensions; Another example: SoundPlayer; Summary |
| 12 | Nov.22 | No lectures | Mandatory Assignment - 2nd part (1) Four hours exercise session |
| 13 | Nov.29 | No lectures | Mandatory Assignment - 2nd part (2) Four hours exercise session |
Newest edition: 4. October (Adjustments to week 6 and week 7)
Previous editions:
- 23. September (Adjustments to week 5 and week 6)
- 15. August