Ambuj Kumar Software Engineering Assignment 3
Ambuj Kumar Software Engineering Assignment 3
1. Project Management
2. Software Design
2.2 Pseudocode
Start
Initialize menu with items and prices
Display menu
Ask user for number of items to order
For each item:
Ask for item number and quantity
Add to order list and calculate total
Display final bill
End
3. Coding (Python)
menu = {
1: ("Burger", 50),
2: ("Pizza", 100),
3: ("Pasta", 80),
4: ("Coffee", 30),
5: ("Sandwich", 40)
}
order = []
total_amount = 0
num_items = int(input("How many different items would you like to order? "))
for _ in range(num_items):
item_no = int(input("Enter item number: "))
quantity = int(input("Enter quantity: "))
if item_no in menu:
item_name, item_price = menu[item_no]
amount = item_price * quantity
order.append((item_name, quantity, item_price, amount))
total_amount += amount
else:
print("Invalid item number! Skipping...")
4. Testing