Lecture overview -- Keyboard shortcut: 'u'  Previous page: The Singleton pattern -- Keyboard shortcut: 'p'  Next page: Factory methods -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Reference types, Value types, and Patterns - slide 26 : 29

A Singleton Random Class
Earlier in this lecture we had a problem with one Random object per Die object
A singleton Random class.
A Die class that uses singleton Random.
A Die application class.
Output from the Die application class.
By using a Singleton Random we ensure that there exists only one Random object