Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Location:
- def __init__(self, pickup_location, dropoff location):
- self._pickup_location = pickup_location
- self._dropoff_location = dropoff_location
- class Car:
- def __init__(self, daily_fee, current_status, car_type, registration, pickup_location, dropoff_location):
- self._daily_fee = daily_fee
- self._current_status = _current_status
- self._car_type = car_type
- self._registration = registration
- self._pickup_location = pickup_location
- self._dropoff_location = dropoff_location
- class Small_Car(Car):
- def __init__(self, car_type):
- self._car_type = car_type
- class Medium_Car(Car):
- def __init__(self, car_type):
- self._car_type = car_type
- class Large_Car(Car):
- def __init__(self, car_type):
- self._car_type = car_type
- class Premium_Car(Car):
- def __init__(self, car_type):
- self._car_type = car_type
- class Car_Rental_System:
- def __init__(self, available_cars, current_customers, current_bookings):
- self._available_cars = []
- self._current_customers = current_customers
- self._current_bookings = current_bookings
- def add_car(self, car_type, pickup_location, dropoff_location, registration):
- if car_type == "Small_Car"
- daily_fee = 50
- if car_type == "Medium_Car"
- daily_fee = 100
- if car_type == "Large_Car"
- daily_fee = 150
- if car_type == "Premium_Car"
- daily_fee = 200
- current_status = "Available"
- for car1 in self._available_cars:
- car1.add_car(Car(daily_fee, current_status, car_type, registration, pickup_location, dropoff_location))
- def matched_cars(self, car_type, pickup_location, dropoff_location):
- return
- def make_booking(self):
- def accept_booking(self):
- def send_email(self):
- def staff_login(self):
- class Customer:
- def __init__(self, age, name, license, email):
- self._age = age
- self._name = name
- self._licence = licence
- self._email = email
- def search_car(self, car_rental_system):
- def pay_rental_fee(self):
- def book_car(self):
- def __str__(self):
- return "name: %s, age: %s, license: %s, email: %s"%(self.name, self.age, self.license, self.email)
- class Booking:
- def __init__(self, rental_period, customer, car, location, insurance):
- self._rental_period = rental_period
- self._customer = customer
- self._car = car
- self._location = location
- self._insurance = insurance
- def calculate_net_price(self)
- class Insurance:
- def __init__(self, excess_insurance, car_type, customer):
- self._excess_insurance = excess_insurance
- self._car_type = car_type
- self._customer = customer
- class Staff:
- def __init__(self, username, password):
- self._username = username
- self._password = password
- class Admin_system:
- def authenticate_staff(self):
- def add_new_cars(self):
- system = Car_Rental_System()
- system.add_car("Small_Car, "Greenacre", "Bankstown", 1234321)
- #self, car_type, pickup_location, dropoff_location, registration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement