Question: PYTHON LANGUAGE 2. Write the following codes: [40 MARKS] a) write a class named Circle. The Circle class shall contain a data attribute radius and

PYTHON LANGUAGEPYTHON LANGUAGE 2. Write the following codes: [40 MARKS] a) write a

2. Write the following codes: [40 MARKS] a) write a class named Circle. The Circle class shall contain a data attribute radius and a method get_area(), as shown in the following class diagram. Circle radius:float = 1.0 init_(). str_(): str. repr_():str. get_area(): float Instance initializer For str() and print() For repr() and prompt b) Using the Circle class that you have developed in the part a and considering the following diagram write a code to override the get_area() method to return the surface area of the cylinder. Rewrite the_str_() method, which also overrides the inherited method. Rewrite the get_volume() to use the superclass' get_area(), instead of this class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!