For example, consider a Figure class. This class should declare an abstract method findArea because the area calculation depends on the type of figure. Different figures (such as rectangles, circles, or triangles) use different formulas to calculate their areas, making it impossible to provide a meaningful implementation in the Figure class itself.
For example, consider a Figure class. This class should declare an abstract method findArea because the area calculation depends on the type of figure. Different figures (such as rectangles, circles, or triangles) use different formulas to calculate their areas, making it impossible to provide a meaningful implementation in the Figure class itself.