I have major issues in understanding the major topic of OOP. Though I been through Dietel book. I have an abstract class shape.
public abstract class Shape
{
public abstract area();
public absract volume;
}
public class Circle extends Shape
{
//definition of area method
}
public class Sphere extends Shape
{
//define volume method
// define area method
}
Now as I have Shape class as Parent class and Circle class as child class, at same time Shape class is an abstract class, Now I want to define area method in Circle class but not volume method, I want to define volume method in Sphere class. But when i do this, it shows me error but if i define both method in Circle class then it works fine. But then Circle class have extra code of volume which is not use of Circle class.