dimanche 15 mars 2015

What is the object-oriented idea I'm trying to get at with my scenario?


I have a scenario where I've made a class, call it myClass, and I've realized I need another class, call it myOtherClass, which will be used inside of myClass but not outside of it. I haven't taken a Computer Science class for years, so I can't remember the terminology for what I'm trying to get at. There is no inheritance going on; just that myClass uses myOtherClass, in fact builds a tree of myOtherClass objects, and I want to encapsulate everything properly.


What is the concept I need to be following and what is it in C++ specifically? Please let me know if I need to try and make this question more clear.




Aucun commentaire:

Enregistrer un commentaire