Solution
Any class that uses the Singleton pattern must achieve three goals:
Encapsulate a shared resource.
Provide a standard way to create one shared instance.
Provide a standard way to access the one shared instance.
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial