-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (29 loc) · 1.03 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from ui.CustomerUi import CustomerUi
from ui.CarUi import CarUi
from ui.BookingUi import BookingUi
def main():
carUi = CarUi()
carUi.clear()
print("\n\nWelcome to Nordic Car Rental!\n")
action = ""
while (action != "4"):
print("\nMAIN MENU")
carUi.lineInHeader()
print("Please enter the number for following actions:\n")
mainMenu = "\t{:<30}\n\t{:<30}\n\t{:<30}\n\t{:<30}\n\t".format("1 - Bookings", "2 - Car", "3 - Customers", "4 - Quit")
print(mainMenu)
action = input("Choose an option: ")
if action == "1":
bookingUi = BookingUi()
bookingUi.mainMenu()
elif action == "2":
carUi.mainMenu()
elif action == "3":
ui = CustomerUi()
ui.customerMenu()
elif action == "4":
break
else:
print("Please enter valid number")
print()
main()