|
|
The Singleton pattern |
Problem: For some classes we wish to guarantee that at most one instance of the class can be made. Solution: The singleton design pattern |
A singleton Die is - most probably - not very useful. On the next slide we will show a singleton Random, which solves a real problem |