print("You are not authorized to
roll back the reading of the
odometer.")
def incrementing_odometer(self, bmileage):
self.odometer_reading += bmileage
class Performancetires():
def __init__(self, performance_tire= 'three textile layered'):
self.performance_tire = performance_tire
def describe_performancetires(self):
print("This racer bike has " + self.performance_tire + "
performance
tires.")
class RacerBike(Bike):
def __init__(self, bmodel, bmake, bcolor, byear):
super(RacerBike,self).__init__(bmodel, bmake, bcolor, byear)
self.performancetires = Performancetires()
self.aerodynamic_efficiency = 'better lift/drag ratio'
def describe_aerodynamics(self):
print("This racer bike has " + self.aerodynamic_efficiency + " for
improved aerodynamic efficiency.")
def incrementing_odometer(self, bmileage):
print("I cannot increment the odometer.")
Do'stlaringiz bilan baham: