For this exercise, you will turn a regular class into a singleton class that only allows one instance to be created.
This program contains a class called "Deck" for representing the set of 52 cards. It's possible that we want the same deck of cards to be available to all parts of our program, and that we only want one deck to be created. This would make it a candidate for being a singleton.
Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.