In this commit, I implement a Creational Design Pattern, the Singleton Pattern.
The Singleton Pattern needs to meet three requirements:
The constructor is already private so the first requirement is met
A private instance is created and stored
Def implemented to allow access to the current instance
Also checks upon initialization in the constructor if an instance is already present to ensure it follows the Singleton Pattern
In this commit, I implement a Creational Design Pattern, the Singleton Pattern. The Singleton Pattern needs to meet three requirements: The constructor is already private so the first requirement is met A private instance is created and stored Def implemented to allow access to the current instance Also checks upon initialization in the constructor if an instance is already present to ensure it follows the Singleton Pattern