← 返回 walmartlabs 的题目列表OOD: Implement Classes Based on a Given Shape Interface
类型:online_judge
Problem: OOD - Implement Classes Based on a Given Shape Interface
You are given a Shape interface (or abstract class) that declares several required methods (e.g., area(), perimeter(), draw(), etc.; exact methods depend on the prompt).
In the online editor, you need to:
Implement at least one concrete shape class (e.g., Circle / Rectangle) that implements/extends Shape.
Provide correct implementations for all required methods.
Ensure the code compiles/runs and passes the platform's tests.
Requirements
Follow good OOP practices: encapsulation, clear constructor parameters, and basic validation where appropriate.
If time permits, you may add more shape classes, but at least one working implementation is required.