Plan
- Classes
- interface
- class
- abstract class
- accessibiliy
Variables and methods
- accessibility
- class / instance
- clone()
Examples :
Implementation and inheritance
How to write readable and reusable code
Example Exchange (versions 1 to 3)
Methods inherited from java.lang.Object
: equals(Object), hashCode(), toString(), clone()
Algorithm
for
method selection
Example Exchange (versions 4 and 5)
Exceptions
- New version of People with a default implementation in the
interface :
Use of Exception
Example Exchange (versions
6 and 7)
Abstract class
Map : java.util.Map
Interface with default method
Generics and collections
"Why a Square is not a Rectangle
?"
"Why a ColorPoint is not a Point ?"
Concept of "view" : ColorPoint
(version 5 and 6)
Sort (versions 1 to 4)
Pattern Adapter - Sort (version 5)
- Generics (use of jokers)
Sort (version 6)
Pattern Decorator - Sort (version 7) + ColorPoint
(version 8)
Pattern Façade - Sort (version 8)
Pattern Observer - Sort (version 9)
Lambda
expressions - Sort (version 12)
Pattern Iterator (and lambda
expressions)
- GUI toolkit = components + layouts + events
Swing
- Components
- Layout managers and examples
- HelloWorld versions 1, 2 and 3
- SwingApplication
- CoordinatesDemo
- Line
- Browser (version 0)
- Browser (version 1-History)
- Browser (version 2-Multiple
windows)
- Calculator (version 1)
Calculator (version 2)
Threads
- PingPong
- Producer/Consumer
- Curves
- Counter
- Particles
- People
- Serialization, Unit tests
Sort (versions 9-11)
- Graphical interface, plugin, threads
Exam
2018
- Exam 2019
Exam 2019-S2