Singleton Design Pattern

With his design patttern we allways get the same instance, as you can see next.

  1. The Singleton class:

 

2. The main class:

 

3. The result:

singleton

 

UML
singleton

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.