previous | start | next

The SINGLETON Pattern

Solution

  1. Define a class with a private constructor.
  2. The class constructs a single instance of itself.
  3. Supply a static method that returns a reference to the single instance.

previous | start | next