Shape Polymorphism
EasyDesign an abstract Shape with a calculate_area() method.
Create Circle, Rectangle, and Triangle subclasses that implement it differently.
Store different shapes in a list and compute the total area.
OOP Focus: Polymorphism via method overriding.
Note: This is statement-only in the current Practice version; stdout should be empty.
Loading editor...
Output
Run or submit to see output.