Applied Design Patterns with Java

Simple Factory {C ch 3}

This is a simplified Factory pattern example that is not in the Design Patterns catalog, but it does show a very basic pattern concept: returning an instance of one of several possible classes, based on data or event evaluation. It is a subset of the Factory Method pattern.

Example - UML : Namer



The example Java program is called 'Namer'.

The UML diagram is above, and the list of Java files is below:

Creational