I have a "best practice" question. In a program I have 3 classes A, B & C. There can only be a single instance of class A but methods in that instance must be useable from both B and C.
Staying within the 'confines' of OOP, how and where do I declare the instance of A?
If there's a better way of doing this I'd welcome hearing it.
Staying within the 'confines' of OOP, how and where do I declare the instance of A?
If there's a better way of doing this I'd welcome hearing it.
Last edited: