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 LANGUAGE![PYTHON LANGUAGE 2. Write the following codes: [40 MARKS] a) write a](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f31c9c4cf4a_60366f31c9ba5d4e.jpg)
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
Get step-by-step solutions from verified subject matter experts
