| Lecture |
Description |
Resources |
| 1 |
Software quality; programming as modeling
|
|
| 2 |
An object-oriented description of the world;
a Java program that uses a 'predefined' object
|
|
| 3 |
Classes and instances; constructing new objects from
class definitions; colours and windows
|
|
| 4 |
Java strings are objects; some of their methods;
a string manipulation
program
|
|
| 5 |
Reuse; Writing our own class definitions,
containing simple instance methods; the
Wreck class definition.
|
|
| 6 |
Local variables & formal parameters:
their declaration, their initialisation, the
scope of their identifiers and their lifetimes
|
- Overheads: ps (26k)
- Code: jar (2k)
|
| 7 |
Instance variables:
their declaration, their initialisation, the
scope of their identifiers, their lifetimes
and their visibility.
|
|
| 8 |
PersonName, another instance
variable example; constructors.
|
|
| 9 |
BankAccount, another example;
the object reference this.
|
|
| 10 |
LibraryBook, another example;
overloading of constructors, methods and
operators.
|
- Overheads: ps (25k)
- Code: jar (3k)
|
| 11 |
Borrower, another example;
class variables.
|
|
| 12 |
Time, another example;
named constants.
|
|
| 13 |
Continuing the Time example;
encapsulation, cohesion, coupling, procedural
abstraction & helper methods.
|
- Overheads: ps (27k)
- Code: jar (3k)
|
| 14 |
Modifying the Time example; data abstraction.
|
- Overheads: ps (26k)
- Code: jar (3k)
|
| 15 |
Ticket, another example;
class methods.
|
|
| 16 |
Fraction, an example for discussing
how to go about writing and testing class
definitions.
|
|
| 17 |
Continuing the discussion of Fraction
and the process of writing and testing class
definitions.
|
- Overheads: ps (29k)
- Code: jar (3k)
|
| 18 |
Summary of the elements of a class definition;
aspects of software quality; portability.
|
|
| 19 |
Primitive types versus reference types; the
effects of assignment and the role of
toString.
|
|
| 20 |
More on primitive types & reference types; testing for
equality and parameter passing; garbage collection.
|
|
| 21 |
Implementing associations between objects using
references stored in instance variables.
|
|
| 22 |
Class hierarchies; inheritance of instance
variables; an example involving an academic's
publications.
|
|
| 23 |
Inheritance of instance methods; overriding;
constructors in class hierarchies.
|
- Overheads: ps (28k)
- Code: jar (3k)
|
| 24 |
The root class, Object; its interface; wrapper
classes for primitive values.
|
|
| 25 |
Abstract classes and abstract methods.
|
- Overheads: ps (38k)
- Code: jar (10k)
|
| 26 |
Polymorphism and dynamic method binding;
a program that exploits both to print the lyrics of
a song.
|
|
| 27 |
Another example of polymorphism and dynamic method binding:
a camera shop; the role of abstract classes and abstract
methods.
|
|
| 28 |
Using polymorphism, dynamic method binding and casting
to implement and use generic data structures.
|
- Overheads: ps (28k)
- Code: jar (5k)
|
| 29 |
Java interfaces as specifications; using interface types
polymorphically to reduce coupling in programs.
|
|
| 30 |
The Java 2 Collections Framework; iterators.
|
|
| 31 |
The way that Java interfaces can `cut across' class
hierarchies; when to use interfaces; when to use inheritance.
|
|
| 32 |
GUIs & event-driven programming; the main objects that
comprise a GUI; the Java event dispatch loop.
|
|
| 33 |
A GUI to a program that converts between Fahrenheit &
centigrade; containers & layout managers.
|
|
| 34 |
Variations on the temperature conversion GUI, showing different
design decisions.
|
|
| 35 |
Positioning & sizing components within containers;
layout managers, including GridBagLayout.
|
|
| 36 |
The 3-layered architecture of a shop till program.
|
|
| 37 |
The Swing component class hierarchy; how to avoid
custom painting (colours, borders, fonts, images, etc., etc.);
JLists; burger bars!
|
|
| 38 |
Custom painting; the paint and
repaint methods; the graphics context; drawing
pie charts.
|
|
| 39 |
Very simple concurrent Java programs;
animation and concurrency;
polite animation.
|
|
| 40 |
Defensive programming; Java exception-handling.
|
|
| 41 |
More on exceptions (checked & unchecked; the catch-or-specify
principle); simple file handling (reading & writing bytes).
|
|
| 42 |
Java file-handling; types of file; sequential binary files;
a program for managing a file of countries.
|
|
| 43 |
Writing objects to sequential binary files;
sequential text files; random-access files.
|
- Overheads: ps (40k)
- Code: jar (8k)
|
| 44 |
A simple software development process; the Unified
Modeling Language (UML); class diagrams; sequence diagrams.
|
|
| 45 |
Class diagram and sequence diagram case study: modeling
the problem domain for a photocopier repair company.
|
|
| 46 |
CD-Direkt case study: analysis, design &
implementation.
|
|
| Exercises |
| A |
Exercise sheet A
|
|
| B |
Exercise sheet B
|
|
| C |
Exercise sheet C
|
|
| D |
Exercise sheet D
|
|
| E |
Exercise sheet E
|
|
| F |
Exercise sheet F
|
|
| G |
Exercise sheet G
|
|
| Sample Exam |
Sample Exam
|
|
| Tutorials |
- Tutorial 9/12/02
- We produced the following solution to sheet A:
URLParser.java
- We discussed the following multiple-choice question:
mcq1.txt
- Tutorial 16/12/02
|