I have a parent class with a number of methods.
For all the child classes except one, they all use the methods in addition to some of their own. I have one class that doesn't require one of the methods of the parent class and it doesn't make sense for that particular child to have access to that method. Is there anyway that I can "block" the child from accessing that method of the parent class.
To clarify this, I make an abstract class called 3dShapes. It has abstract methods of getLength(), getWidth() and getHeight(). Now these methods make sense when you are deal with cubes and such, but the width or height method doesn't make sense when it comes to a sphere.
I hope this is clear.....
For all the child classes except one, they all use the methods in addition to some of their own. I have one class that doesn't require one of the methods of the parent class and it doesn't make sense for that particular child to have access to that method. Is there anyway that I can "block" the child from accessing that method of the parent class.
To clarify this, I make an abstract class called 3dShapes. It has abstract methods of getLength(), getWidth() and getHeight(). Now these methods make sense when you are deal with cubes and such, but the width or height method doesn't make sense when it comes to a sphere.
I hope this is clear.....