Now, we will now get to know the Singleton Design Pattern.
The Singleton pattern is used when there must be exactly one instance of a class, and it must be accessible to clients from a well-known access point or when the sole instance should be extensible by sub-classing, and clients should be able to use an extended instance without modifying their code.
Via a real life example, you will learn how and when the Singleton design pattern should be used and how to structure your code in order to implement it. You will see how it can lead to elegant solutions to code problems.