Advertisement
atanasovetr

Untitled

Mar 25th, 2019
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.96 KB | None | 0 0
  1. class vehicle:
  2.     def __init__(self,seats, horsepower, weight, gearboxType, color, fuel ):
  3.         self._seats = str(seats)
  4.         self._horsepower = int(horsepower)
  5.         self._weight = int(weight)
  6.         self._gearboxType = str(gearboxType)
  7.         self._color = str(color)
  8.         self._fuel = str(fuel)
  9.     def accelerate(self):
  10.         """accelerate"""
  11.     def stop(self):
  12.         """stop"""
  13.  
  14. class bat_speedster(vehicle):
  15.     def open_close_roof(self):
  16.         """open_close_roof"""
  17. class bat_suv(vehicle):
  18.     def switch_4x4(self):
  19.         """switch_4x4"""
  20. class bat_limousine(vehicle):
  21.     def recharge(self):
  22.         """recharge"""
  23.  
  24. car1 = bat_speedster("2 sport",320,1600,"manual","red","gasoline")
  25. car1.accelerate()
  26. car1.stop()
  27.  
  28. car2 = bat_suv("7 basic", 150, 1850,"automatic", "blue", "diesel")
  29. car2.accelerate()
  30. car2.stop()
  31.  
  32. car3 = bat_limousine("5 leather", 260, 2100, "automatic", "gray", "electric car")
  33. car3.accelerate()
  34. car3.stop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement