WAP For The Task Mentioned in The Below Task To Be Done' Section
WAP For The Task Mentioned in The Below Task To Be Done' Section
1. Tasks to be done:
Create an abstract class Shape having an abstract method area (self, x, y). Create
two subclasses Rectangle and Circle that will override the area () method of Shape
class. Finally create objects of Rectangle and Circle class and find the area.
2. Code:
@abstractmethod
def area(self):
pass
class circle(Shape):
def __init__(self,radius):
self.__radius=radius
3. Screenshots:
1. Python Programming.
2. Print output
3. Abstract classes
4. Making Subclasses
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):