-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
101 lines (91 loc) · 3.36 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
from food_item import FoodItem
from menu import Menu
from users import Customer, Admin, Employee
from restaurent import Restaurent
from orders import Order
mamar_restaurent = Restaurent("Mamar Restaurement")
def customer_menu():
name = input("Enter Your Name : ")
email = input("Enter Your Email : ")
phone = input("Enter Your Phone : ")
address = input("Enter Your Address : ")
customer = Customer(name=name, email=email, phone=phone, address=address)
while True:
print(f"Welcome {customer.name}!!")
print("1. View Menu")
print("2. Add item to cart")
print("3. View Cart")
print("4. PayBill")
print("5. Exit")
choice = int(input("Enter Your Choice : "))
if choice == 1:
customer.view_menu(mamar_restaurent)
elif choice == 2:
item_name = input("Enter item name : ")
item_quantity = int(input("Enter item quantity : "))
customer.add_to_cart(mamar_restaurent, item_name, item_quantity)
elif choice == 3:
customer.view_cart()
elif choice == 4:
customer.pay_bill()
elif choice == 5:
break
else:
print("Invalid Input")
def admin_menu():
name = input("Enter Your Name : ")
email = input("Enter Your Email : ")
phone = input("Enter Your Phone : ")
address = input("Enter Your Address : ")
admin = Admin(name=name, email=email, phone=phone, address=address)
while True:
print(f"Welcome {admin.name}!!")
print("1. Add New Item")
print("2. Add New Employee")
print("3. View Employee")
print("4. View Items")
print("5. Delete Item")
print("6. Exit")
choice = int(input("Enter Your Choice : "))
if choice == 1:
item_name = input("Enter Item Name : ")
item_price = int(input("Enter Item Price : "))
item_quantity = int(input("Enter Item Quantity : "))
item = FoodItem(item_name, item_price, item_quantity)
admin.add_new_item(mamar_restaurent, item)
elif choice == 2:
name = input("Enter employee name : ")
phone = input("Enter employee phone : ")
email = input("Enter employee email : ")
designation = input("Enter employee designation : ")
age = input("Enter employee age : ")
salary = input("Enter employee salary : ")
address = input("Enter employee address : ")
employee = Employee(name, email, phone, address,
age, designation, salary)
admin.add_employee(mamar_restaurent, employee)
elif choice == 3:
admin.view_employee(mamar_restaurent)
elif choice == 4:
admin.view_menu(mamar_restaurent)
elif choice == 5:
item_name = input("Enter item name : ")
admin.remove_item(mamar_restaurent, item_name)
elif choice == 6:
break
else:
print("Invalid Input")
while True:
print("Welcome!!")
print("1. Customer")
print("2. Admin")
print("3. Exit")
choice = int(input("Enter your choice : "))
if choice == 1:
customer_menu()
elif choice == 2:
admin_menu()
elif choice == 3:
break
else:
print("Invalid Input!!")