Implement the design of the Motorcycle class so that the following output is produced: [Your code should
Question:
Implement the design of the Motorcycle class so that the following output
is produced:
[Your code should work for any number of services added in the add_Services
method]
# Write your code here
# Do not change the following lines of code.
print('No. of Motorcycle =', Motorcycle. Count)
m1 = Motorcycle('Yamaha MT-15', 2019)
m1.add_Services('Oil change', 'Replace coolant')
m2 = Motorcycle('Suzuki V-Strom 650', 2020)
m2.add_Services('Rear suspension check', 'New air filter', 'Oil change')
m3 = Motorcycle('Honda Gold Wing', 2017)
m3.add_Services('Adjustment of throttle and clutch', 'New oil filter')
print("=========================")
m1.printMotorcycleDetail()
print("=========================")
m2.printMotorcycleDetail()
print("=========================")
m3.printMotorcycleDetail()
print("=========================")
print('No. of Motorcycle =', Motorcycle.count)
Output:
No. of Motorcycle = 0
=========================
Name: Yamaha MT-15
Year of manufacture: 2019
Services: Oil change, Replace coolant
=========================
Name: Suzuki V-Strom 650
Year of manufacture: 2020
Services: Rear suspension check, New air filter, Oil change
=========================
Name: Honda Gold Wing
Year of manufacture: 2017
Services: Adjustment of throttle and clutch, New oil filter
=========================
No. of Motorcycle = 3