Design Shape Classes with Area Method
Filed under Expedia
The question
Construct three classes: Circle, Rectangle, and Square. Each must have a getArea() method returning the area value. Circle has a float radius, Rectangle has width and height, and Square has width.
No write-up yet. Related questions below have one.
Related Expedia questions
Collected from public candidate posts and coding forums. Updated Nov 2026.