We made the DataStore object a Singleton. That is, we made its constructor private so a DataStore object could be instantiated only by a static method in the DataStore class itself. The static method can ensure that it returns only the same single instance of a DataStore object when it is called. |