For the sake of discussion, say I have a sphere class with a few public and private methods. Since I have this generic class I would like to define a second class that is more specific of the type, like balls, bearings, and so on. So for my second class I make this declaration:
class kind:public spehre {
...
Sphere is the base class and kind is the derived class. Now I have access to the public methods and members of the class sphere.
So my question is this. How is what I just did different than declaring an instance of the sphere class in my kind class?
class kind{
sphere type;
...
I would be granted the same access as I did above. Is there something I'm missing? Is the second way possible, but not good programming?