Advertisement
Guest User

Untitled

a guest
Apr 9th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. class Location:
  2.  
  3. def __init__(self, pickup_location, dropoff location):
  4. self._pickup_location = pickup_location
  5. self._dropoff_location = dropoff_location
  6.  
  7. class Car:
  8. def __init__(self, daily_fee, current_status, car_type, registration, pickup_location, dropoff_location):
  9. self._daily_fee = daily_fee
  10. self._current_status = _current_status
  11. self._car_type = car_type
  12. self._registration = registration
  13. self._pickup_location = pickup_location
  14. self._dropoff_location = dropoff_location
  15.  
  16. class Small_Car(Car):
  17. def __init__(self, car_type):
  18. self._car_type = car_type
  19.  
  20. class Medium_Car(Car):
  21. def __init__(self, car_type):
  22. self._car_type = car_type
  23.  
  24. class Large_Car(Car):
  25. def __init__(self, car_type):
  26. self._car_type = car_type
  27.  
  28. class Premium_Car(Car):
  29. def __init__(self, car_type):
  30. self._car_type = car_type
  31.  
  32. class Car_Rental_System:
  33. def __init__(self, available_cars, current_customers, current_bookings):
  34. self._available_cars = []
  35. self._current_customers = current_customers
  36. self._current_bookings = current_bookings
  37.  
  38. def add_car(self, car_type, pickup_location, dropoff_location, registration):
  39. if car_type == "Small_Car"
  40. daily_fee = 50
  41. if car_type == "Medium_Car"
  42. daily_fee = 100
  43. if car_type == "Large_Car"
  44. daily_fee = 150
  45. if car_type == "Premium_Car"
  46. daily_fee = 200
  47. current_status = "Available"
  48.  
  49. for car1 in self._available_cars:
  50. car1.add_car(Car(daily_fee, current_status, car_type, registration, pickup_location, dropoff_location))
  51.  
  52. def matched_cars(self, car_type, pickup_location, dropoff_location):
  53. return
  54.  
  55. def make_booking(self):
  56.  
  57. def accept_booking(self):
  58.  
  59. def send_email(self):
  60.  
  61. def staff_login(self):
  62.  
  63.  
  64. class Customer:
  65.  
  66. def __init__(self, age, name, license, email):
  67. self._age = age
  68. self._name = name
  69. self._licence = licence
  70. self._email = email
  71.  
  72. def search_car(self, car_rental_system):
  73.  
  74. def pay_rental_fee(self):
  75.  
  76.  
  77. def book_car(self):
  78.  
  79. def __str__(self):
  80. return "name: %s, age: %s, license: %s, email: %s"%(self.name, self.age, self.license, self.email)
  81.  
  82. class Booking:
  83.  
  84. def __init__(self, rental_period, customer, car, location, insurance):
  85. self._rental_period = rental_period
  86. self._customer = customer
  87. self._car = car
  88. self._location = location
  89. self._insurance = insurance
  90.  
  91. def calculate_net_price(self)
  92.  
  93. class Insurance:
  94.  
  95. def __init__(self, excess_insurance, car_type, customer):
  96. self._excess_insurance = excess_insurance
  97. self._car_type = car_type
  98. self._customer = customer
  99.  
  100. class Staff:
  101.  
  102. def __init__(self, username, password):
  103. self._username = username
  104. self._password = password
  105.  
  106. class Admin_system:
  107.  
  108. def authenticate_staff(self):
  109.  
  110. def add_new_cars(self):
  111.  
  112. system = Car_Rental_System()
  113.  
  114. system.add_car("Small_Car, "Greenacre", "Bankstown", 1234321)
  115.  
  116. #self, car_type, pickup_location, dropoff_location, registration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement