Chapter 9 (Web hosting servers) Object-Oriented Programming 521 Section Creational design

Chapter 9 Object-Oriented Programming 521 Section Creational design patterns Structural design patterns Behavioral design patterns 13.18 Factory Method Adapter Chain-of-Responsibility Bridge Command Composite Observer Strategy Template Method 17.10 Abstract Factory Decorator Facade 21.12 Prototype Iterator Fig. 9.40Fig. 40 The 18 Gang-of-four design patterns discussed in Java How to Program 4/e (part 2 of 2). Section Concurrent design patterns Architectural patterns 15.13 Single-Threaded Execution Guarded Suspension Balking Read/Write Lock Two-Phase Termination 17.10 Model-View-Controller Layers Fig. 9.4141 Concurrent design patterns and architectural patterns discussed in Java Fig. How to Program, 4/e. 9.24.1 Creational Design Patterns Creational design patterns address issues related to the creation of objects, such as preventing a system from creating more than one object of a class (the Singleton creational design pattern) or deferring until execution time the decision as to what types of objects are going to be created (the purpose of the other creational design patterns discussed here). For example, suppose we are designing a 3-D drawing program, in which the user can create several 3-D geometric objects, such as cylinders, spheres, cubes, tetrahedrons, etc. At compile time, the program does not know what shapes the user will choose to draw. Based on user input, this program should be able to determine the class from which to instantiate an object. If the user creates a cylinder in the GUI, our program should know to instantiate an object of class Cylinder. When the user decides what geometric object to draw, the program should determine the specific subclass from which to instantiate that object. The gang-of-four book describes five creational patterns (four of which we discuss in this book): Abstract Factory (Section 17.10) Builder (not discussed) Copyright 1992 2002 by Deitel & Associates, Inc. All Rights Reserved. 7/7/01

Leave a Reply