Question
Write in C++: Maurice used to work in IT but decided it was time for a career change. He opened a restaurant called MessiJoes. You
Write in C++:
Maurice used to work in IT but decided it was time for a career change. He opened a restaurant called MessiJoes. You will be creating a program to help manage the restaurant operations. Your program must take reservations and check customers in when they arrive. You will also need to manage the orders by allowing for order entry and marking an order as completed. The final functionality should calculate and enter payment for customer bills. The program must meet the following requirements:
- You will need to create a struct to manage a reservation. A reservation will be for a certain time, have the customer name, and the number of people.
- You will need to create a struct to manage a table. Tables have a size that determines the maximum number of people that can sit at them. When a reservation is checked in, the group will be assigned to a table that is large enough to hold the group. You should also keep track of the number of people currently seated at the table and if the table is free to be used or if it is currently being used. Each table should have a table number.
- You will need to create an enumeration to manage the menu items. The menu will consist of the following items.
- Veggie Burger $35
- Hamburger $45
- Fried Chicken Sliders $38
- Hamburger Sliders $38
- Veggie Sliders $38
- Haddock Sandwich $38
- BLT $42
- Faux BLT $42
- Chicken Burrito $42
- Falafel Wrap $42
- Cheese Pizza $59
- Pepperoni Pizza $59
- Faux meat and chips $77
- Fish and chips $77
- You will need to create a struct to manage an order. The order needs to be associated with a table and a customer reservation. It should contain an array of menu items that represents the items ordered by the customers at that table. It should also have the number of items ordered (1 per person in the party). There are booleans that represent if the order is complete meaning that it has been delivered to the table and if it has been paid.
- You will need to create arrays to manage the tables, reservations, and orders.
- The restaurant has 20 tables
- 8 - 2 Person
- 2 - 10 Person
- 4 - 6 Person
- 6 - 4 Person
- The largest party the restaurant can handle for a reservation is 10 people. For an order, the max number of items ordered is also 10 (1 per person).
- There can be 50 reservations at most.
- There is 1 order per reservation, so there are also, at most, 50 orders.
- The restaurant has 20 tables
- The main UI for the program will be a menu that has the following options
- Make Reservation
- This option collects information and adds a reservation to the system.
- Check-in for reservation.
- This option displays all reservations that haven't yet checked in and allows you to check in the reservation and assign it to a table.
- Enter Order
- Enters an order for a table.
- Complete Order
- Marks an order as completed which means it has been delivered to a table and is ready to be paid for.
- Calculate and pay the bill
- Calculates the bill based on the menu prices listed above with the menu items. A 20% tip and 10% tax should be added to the final total. The tip amount is calculated based on the subtotal without the tax added in.
- Close the restaurant
- This option will only show up if there are no pending reservations and there are no outstanding orders (orders that are not completed and not paid for), and when chosen, it exits the program.
- Make Reservation
- You must have at least 3 functions. Any functions pulled from class demos do not count toward the 3.
- You can create additional structs/arrays as needed, but you cannot use classes, pointers, vectors, or other constructs not covered during the semester.
Sample Output
Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 5 Choose the order to calculate the bill: There are no orders ready for payment Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 1 Enter a name for the reservation: Louie Singleton Enter the number of people in the party: 4 Enter the time for the reservation in HH::MM AM/PM: 07:30 PM Please confirm the reservation: Reservation Name: Louie Singleton Reservation Time: 07:30 PM Number in Party: 4 Is this information correct [Y]es, [N]o (make changes), [C]ancel? c Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 1 Enter a name for the reservation: Neha Fuller Enter the number of people in the party: 5 Enter the time for the reservation in HH::MM AM/PM: 10:30 AM Please confirm the reservation: Reservation Name: Neha Fuller Reservation Time: 10:30 AM Number in Party: 5 Is this information correct [Y]es, [N]o (make changes), [C]ancel? y Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill Please choose the table for the order: There are no tables without orders. Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 1 Enter a name for the reservation: Rahim Hull Enter the number of people in the party: 10 Enter the time for the reservation in HH::MM AM/PM: 07:00 PM Please confirm the reservation: Reservation Name: Rahim Hull Reservation Time: 07:00 PM Number in Party: 10 Is this information correct [Y]es, [N]o (make changes), [C]ancel? n What do you want to change? 1. Name 2. Number of People 3. Time 4. Cancel 3 Enter the time for the reservation in HH::MM AM/PM: 10:00 AM Please confirm the reservation: Reservation Name: Rahim Hull Reservation Time: 10:00 AM Number in Party: 10 Is this information correct [Y]es, [N]o (make changes), [C]ancel? y Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 1 Enter a name for the reservation: Zarah Silva Enter the number of people in the party: 9 Enter the time for the reservation in HH::MM AM/PM: 03:00 PM Please confirm the reservation: Reservation Name: Zarah Silva Reservation Time: 03:00 PM Number in Party: 9 Is this information correct [Y]es, [N]o (make changes), [C]ancel? y Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 3 Choose the order to complete: There are no orders to complete. Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill Enter a name for the reservation: Mario Hartley Enter the number of people in the party: 9 Enter the time for the reservation in HH::MM AM/PM: 02:00 PM Please confirm the reservation: Reservation Name: Mario Hartley Reservation Time: 02:00 PM Number in Party: 9 Is this information correct [Y]es, [N]o (make changes), [C]ancel? y Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 2 Choose the reservation to check in 1: Neha Fuller - 10:30 AM, 5 people 2: Rahim Hull - 10:00 AM, 10 people 3: Zarah Silva - 03:00 PM, 9 people 4: Mario Hartley - 02:00 PM, 9 people 1 Please assign a table: 9: 10 people 10: 10 people 11: 6 people 12: 6 people 13: 6 people 14: 6 people 11 Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 2 Choose the reservation to check in 2: Rahim Hull - 10:00 AM, 10 people 3: Zarah Silva - 03:00 PM, 9 people 4: Mario Hartley - 02:00 PM, 9 people 2 Please assign a table: 9: 10 people 10: 10 people 10 Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill Enter a name for the reservation: Barry Pham Enter the number of people in the party: 9 Enter the time for the reservation in HH::MM AM/PM: 10:30 PM Please confirm the reservation: Reservation Name: Barry Pham Reservation Time: 10:30 PM Number in Party: 9 Is this information correct [Y]es, [N]o (make changes), [C]ancel? N What do you want to change? 1. Name 2. Number of People 3. Time 4. Cancel 1 Enter a name for the reservation: Gabriella Clements Please confirm the reservation: Reservation Name: Gabriella Clements Reservation Time: 10:30 PM Number in Party: 9 Is this information correct [Y]es, [N]o (make changes), [C]ancel? y Welcome to Messijoes 1. Make Reservation 2. Check-in Reservation 3. Enter Order 4. Complete Order 5. Calculate and Pay Bill 3 Please choose the table for the order: 10: Table 10 11: Table 11 10 Please choose entree number 1 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 14 Please choose entree number 2 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 8 Please choose entree number 3 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 11 Please choose entree number 4 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 4 Please choose entree number 5 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 10 Please choose entree number 6 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 5 Please choose entree number 7 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 4 Please choose entree number 8 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 11 Please choose entree number 9 1: Veggie Burger 2: Hamburger 3: Fried Chicken Sliders 4: Hamburger Sliders 5: Veggie Sliders 6: Haddock Sandwich 7: BLT 8: Faux BLT 9: Chicken Burrito 10: Falafel Wrap 11: Cheese Pizza 12: Pepperoni Pizza 13: Faux Meat and Chips 14: Fish and Chips 3
I asked this before and the code infinitely looped. The program we use uses text file their IO testing. Here is an example:5 1 Louie Singleton 4 07:30 PM c 1 Neha Fuller 5 10:30 AM y 5 3 1 Rahim Hull 10 07:00 PM n 3 10:00 AM y 1 Zarah Silva 9 03:00 PM y 4 4 3 3 1 Mario Hartley 9 02:00 PM y 5 3 4 3 3 3 3 5 5 2 1 11 4 2 2 10 4 5 5 1 Barry Pham 9 10:30 PM N 1 Gabriella Clements y 3 10 14 8 11 4 10 5 4 11 3 10 4 1 4 3 11 7 9 12 8 2
1 Sadie Levine 9 09:30 AM N 2 2 y 3 4 2 2 3 9 2 6 3 2 4 5 1 y 2 4 10 5 2 y 3 3 12 13 3 9 10 10 3 3 11 9 7 6 13 4 3 3 10 8 11 10 12 9 4 13 2 6 4 4 4 5 5 5 y 5 3 y 5 4 y 2 5 9 3 9 8 11 10 12 9 4 13 2 6 4 6 5 6 y 6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started