Question: 14.7 (LAB) (Python 3) Create CD Radio (Inheritance) Below you'll find a Radio class. It has a volume attribute and a radio station attribute. You

 14.7 (LAB) (Python 3) Create CD Radio (Inheritance) Below you'll find

14.7 (LAB) (Python 3) Create CD Radio (Inheritance) Below you'll find a Radio class. It has a volume attribute and a radio station attribute. You should create a new class called CDRadio that inherits from the Radio class (1 pt). The init should take volume, station and a mode attribute. (The mode attribute is a string and will default to "Radio, It can also be set to CD" when it switches to listening to a cd. ) During the init you should use an unbound method call to set the volume and station attributes. 4 pts) You should create a str method for your class that returns the string representation of a CD Radio. If the mode is radio it should make an unbound method call and return the Radio str method. (1 pt) If the mode is "CD" it should return Volume: 80 - Playing CD, Where 80 would be replaced by the current volume of the radio. (1 pt) ACTIVTY 14.7.1: (LAB) (Python 3) Create CD Radio (Inheritance) main.py Load default template. 1 class Radio(object): def-init-(self, volume : int = 20, station : float = 88.2): """ Initialize the radio to default values for volume and FM Station. "" self.volume volume 4 6 self.station station def-str-(self): return "Volume : -Station :.1f)".format (self.volume, self.station) 9 10 11 ## Create CDRadio class below

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!