Basses – Using the class called Bass in the file bass.py and the driver in bass_driver.py, develop a class called Double_Bass in a file called double_bass.py. The class Double_Bass imports the class Bass (don’t copy the code from bass.py), and inherits the class Bass. It extends the functionality of this class by adding two additional attributes called “bow type” and “extension.” The attribute “extension” has a default of None. The method get_bass_description() is overridden and extended such that if “extension” is present, it prints a formatted line including the extension information. Otherwise, it print the information without mentioning the extension. A method called get_bow_type() is also added. It returns the bow type attribute. FYI, an extension is a device that allows a bass to play notes lower in pitch than a standard double bass.
Basses – Using the class called Bass in the file bass.py and the driver in bass_driver.py, develop a class called Double_Bass in a file called double_bass.py.
The class Double_Bass imports the class Bass (don’t copy the code from bass.py), and inherits the class Bass. It extends the functionality of this class by adding two additional attributes called “bow type” and “extension.”
The attribute “extension” has a default of None.
The method get_bass_description() is overridden and extended such that if “extension” is present, it prints a formatted line including the extension information. Otherwise, it print the information without mentioning the extension.
A method called get_bow_type() is also added. It returns the bow type attribute.
FYI, an extension is a device that allows a bass to play notes lower in pitch than a standard double bass.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images