design and implement a class hierarchy for representing different shapes. You will demonstrate your understanding of derived classes, method overriding, and the use of polymorphism to achieve code flexibility and extensibility.
- classes offered are:
- shape
- circle
- triangle
- rectangle
- methods include:
- get color
- set color
- calculate area
- calculate perimeter
- main program insutrctions:
- ensure all code files in same directory
- open terminal, nav to directory containing files
- run python main.py
made by ryan pham