- Introduction: Topic of the course
- Principles of programming in Java
- Concepts: values, variables, types, methods, parameters, arguments, return values, classes, fields, objects, object creation, object references, method activations and the call stack
- First steps in modular programming Part 1 Part 2
- Example: squareroot
- Example: max3
- Example: timeofday
- Concepts: Using Eclipse, creating JUnit test cases, creating classes, instance methods, encapsulation,
private
versuspublic
, using Git, constructors
- Managing complexity through modularity and abstraction
- Concepts: modularity, abstraction, API, client module, importance of documentation, information hiding, procedural abstraction, data abstraction, immutable versus mutable abstractions, abstract value/state of an object, Java's built-in datatypes and operators
- How to properly document single-object abstractions
- Concepts: defensive programming, contractual programming, preconditions, postconditions, class representation invariants (= private class invariants), class abstract state invariants (= public class invariants), getters, mutators
- Single-class entity-relationship abstractions
- Example: html
- Concepts: entity graphs, multi-object abstractions, bidirectional associations, consistency of bidirectional associations, peer objects, peer groups
- Multi-class entity-relationship abstractions
- Concepts: packages, package-accessible fields/constructors/methods/classes, package representation invariants, package abstract state invariants,
HashSet
- Concepts: packages, package-accessible fields/constructors/methods/classes, package representation invariants, package abstract state invariants,
- Polymorphism and dynamic binding
- Concepts: polymorphism, subclassing, inheritance,
instanceof
, typecasts; dynamic binding, method overriding,@Override
; classObject
,Object.equals
,Object.hashCode
,Object.toString
,Object.getClass
- Concepts: polymorphism, subclassing, inheritance,
- Behavioral subtyping: modular reasoning about programs that use dynamic binding
- Example: intlist_inheritance
- Concepts: Non-modular reasoning, modular reasoning, method specifications, correctness of methods; method call resolution, resolved method vs called method, static versus dynamic method call binding; strenghtening of specifications, behavioral types, behavioral subtyping
- Interfaces
- Concepts: interfaces, multiple inheritance, static fields, the Singleton pattern
- Implementation inheritance
- Concepts: Inheritance of fields and methods,
super
constructor calls,super
method calls
- Concepts: Inheritance of fields and methods,
(Students of course H02C5A can ignore this material.)
- Iterators
- Concepts: (external) iterators, iterables, nested classes, inner classes, local classes, anonymous classes, enhanced
for
loop, internal iterators, lambda expressions, capturing outer variables, effectively final variables
- Concepts: (external) iterators, iterables, nested classes, inner classes, local classes, anonymous classes, enhanced
- Streams
- Concepts: streams, sources, map, filter, reduce, collect, parallel streams
- Generics
- Concepts: generic class, generic interface, type parameter, type argument, generic type instantiation, parameterized type, bounded type parameter, covariance, contravariance, invariance, upper-bounded wildcard, lower-bounded wildcard, generic method, erasure, unchecked cast warning