June 2017
Beginner
1296 pages
69h 23m
English
In this section, we use the material on data structures and collections discussed in Chapters 16–21 to identify classes from package java.util that use design patterns.
We conclude our discussion of creational design patterns by presenting the Prototype design pattern.
Sometimes a system must make a copy of an object but will not “know” that object’s class until execution time. For example, consider the drawing program design of Exercise 10.1 in the optional GUI and Graphics Case Study—classes MyLine, MyOval and MyRectangle represent “shape” classes that extend abstract superclass MyShape. We could modify this exercise to allow the user to create, copy ...
Read now
Unlock full access