Question: mplement the class hierarchy shown below in a Python program that does the following: Use Shape as the abstract base class with abstract method called
mplement the class hierarchy shown below in a Python program that does the following:
Use Shape as the abstract base class with abstract method called area.
Implement area method in Circle, Rectangle and Polygon subclasses by using appropriate types, return values assume Polygon implements a regular simple polygon.
Write code that creates objects of the three subclasses and uses the area method to print the area of the shapes by passing any values of your choice:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
