![]() |
![]() |
|
02101 Indledende programmering | ||
Efterår 2007 |
Uge | Dato | Referencer | Subtitles and keywords (på engelsk) |
---|---|---|---|
1 | 4.sept. | Kapitel 1: 1.1-1.14; s.3-16
Kapitel 2: |
Objekter, klasser og Definition af klasser Objects and classes; Creating objects, new ; Calling
methods; Parameters; Data types, int ,
String ; Multiple instances; State; What is an
object?; Object interaction; Source
code; Return values; Objects as parameters The Ticket
Machine example; Examining a class definition; Fields,
constructors, and methods; Passing
data via parameters; Assignment; Accessor methods; Mutator
methods; Printing, |
2 | 11.sept. | Kapitel 2: 2.11-2.18; s.36-49
Kapitel 3: |
Definition af klasser (fortsat) og Samarbejdende objekter The conditional statement, if ... else ; Local variables;
Fields, parameters, and local variables; The Student class example
The Clock example; Abstraction and modularization; Class diagrams,
object diagrams; Primitive types, object types;
The ClockDisplay example, logical operators, String
concatenation, the modulo operator |
3 | 18.sept. | Kapitel 4: 4.1-4.13; s.81-117 |
Gruppering af objekter Grouping objects in flexible-size collections; The personal Notebook example, using ArrayList ;
Object structures with
collections; Generic classes;
Numbering within collections; Removing an
item from a collection; Processing a whole collection,
the for each loop, the
while loop, iterating over a collection,
index access versus iterators; Summary of the
Notebook example;
The Auction example,
anonymous objects, using collections; Flexible collection
summary; Fixed-size
collections, the LogAnalyzer example, declaring
array variables, creating array objects, using array
objects, the for loop
|
4 | 25.sept. | Kapitel 5: 5.1-5.14; s.119-156 |
Biblioteksklasser og dokumentation af klasser Documentation for library classes; The TechSupport system; Reading class documentation, interfaces versus implementation, using library-class methods, checking string equality; Adding random behavior, the Random class, random
responses, reading documentation for parameterized
classes; Packages and import; Using maps for
associations, the concept of a map, using a
HashMap ; Using sets,
e.g. HashSet ; Dividing strings;
Writing class documentation; Public versus private,
information hiding, private methods and public fields;
Learning about classes from their interfaces; Class
variables and constants, the static keyword,
constants |
5 | 2.okt. | Kapitel 6: 6.1-6.13; s.158-188 |
Afprøvning - forskellige aspekter 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 |
6 | 9.okt. | Kapitel 7: 7.1-7.16; s.189-226 |
Design af klasser 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 |
7 | 23.okt. | Kapitel 8: 8.1-8.11; s.229-256
Kapitel 9: |
Nedarvning 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 Object class; Autoboxing and wrapper classes;
The collection hierarchy
The problem: DoME's print method; Static type and
dynamic type; Overriding; Dynamic method lookup; Super call in
methods; Method polymorphism; Object methods:
|
8 | 30.okt. | Kapitel 10: 10.1-10.8; s.278-310 |
Abstraktion: Abstrakte klasser og interfaces Simulations; The foxes-and-rabbits simulation, the foxes-and-rabbits project, the Rabbit class, the Fox
class, the Simulator class: setup, the
Simulator class: a simulation step; Abstract
classes, the Animal superclass, abstract methods,
abstract classes; More abstract methods; Multiple inheritance,
an Actor class; Interfaces, an Actor
interface, multiple inheritance of interfaces, interfaces as
types, interfaces as specifications, abstract class or
interface? |
9 | 6.nov. | Kapitel 12: 12.1-12.8; s.354-384 |
Fejlhåndtering The adress-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 throws clause,
catching exceptions:
the try statement, throwing and catching multiple
exceptions, propagating an exception, the finally
clause; Defining new exception classes; Using assertions,
internal consistency checks, the assert
statement, guidelines for using assertions, assertions and
the BlueJ unit testing framework; Error recovery and avoidance |
10 | 13.nov. | Kapitel 12: 12.9-12.10; s.384-392
Kapitel 13: |
Fejlhåndtering ved input/output og Design af anvendelser Case study: text input/output, readers, writers, streams, the address-book-io project, text output with FileWriter , text input with
FileReader , Scanner : reading input
from the terminal, object serializationAnalysis and design, the verb/noun method, the cinema booking example, using CRC cards, scenarios; Class design, designing class interfaces, user interface design; Documentation; Cooperation; Prototyping; Software growth, waterfall model, iterative development; Using design patterns, structure of a pattern, decorator, singleton, factory method, observer |
11 | 20.nov. | Ingen forelæsninger Arbejd på egen hånd med rapportopgaven som omtalt i ugeplanen |
To timers øvelsesperiode, kl. 10 - 12 Rapportopgaven |
12 | 27.nov. | Ingen forelæsninger | Fire timers øvelsesperiode Rapportopgaven |
13 | 4.dec. | Ingen forelæsninger | Fire timers øvelsesperiode Rapportopgaven |
Sidst ændret: 5. juli