I am writing a communications library, and have several classes in my \nproject. The "main" class (BaseEngine) is responsible for setting up the \nlow level comms machinery (queues, sockets, ports etc). I have chosen a \nsingleton pattern design for this class, because only one such object is \nequired, to provide shared access to the underlying comms plumbing.\n\nThe other remaining classes all do little 'speacialized' jobs - e.g \nsending heartbeat mesages, maintaining topics and subscribers, \nforwarding messages etc, etc. They all require BaseEngine, to get their \nwork done.\n\nCurrently, I have designed the system so that the other classes have a \n"uses-a" relationship with BaseEngine. The implementation is that I have \na private static variable of type BaseEngine in each of these classes. \nMy question is that is a "good" design?. Could I simply have allowed the \nother classes to subclass (i.e. inherit from) BaseEngine?\n\nIs one approach better than the other? - if yes, what are the pros and \ncons on either method?.