Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write me the code in C + + programing languageProgram Functionality: The console application operates in two modes: Manager and Customer. Manager Mode: An authenticated

write me the code in C++ programing languageProgram Functionality:
The console application operates in two modes: Manager and Customer.
Manager Mode: An authenticated manager can view and edit the cafe menu, as well as toggle Maintenance Mode, which locks or unlocks the kiosk functionality.
Customer Mode: Customers can view the menu, place orders, and choose to proceed with payment or cancel.
Program High
-
Level:
1
.
Home Menu:
a
.
Display a welcome message
b
.
Provide "Manager" and "Customer" options, along with an "Exit" applicati feature.
***********
JELCOME
**********************
Welcome to Cafe Kiosk. Start by selecting the option below: A
/
B
/
C
*********
:
A
.
Manager
B
.
Customer
C
.
Exit
Enter your choice:
****
MAIN MENU
****
Ca
1
.
Manager Mode:
.
Authenticate with a username and password from the admin credentia
"credentials.txt
"
b
.
If authentication fails, return to the "Home Menu" menu.
c
.
On successful login
,
present Manager Mode Options:
A
.
Display all Menu: Show items from "menu.txt
"
file.
B
.
Maintenance Mode: Toggle between active and maintenance states.
C
.
Add Menu Item: Add new dishes to 'menu.txt
,
'
ensuring that the total menu items do not exceed
30
items, as this is the maximum capacity of the Kiosk. When you store a menu item to the menu.txt file, use the following format
(
separated by semicolon
(
;
))
.
category;item;price;description
For example: Taco; Burrito;
10.99
; a tortilla filled with food
D
.
Go Back. Return to the "Home" menu.
********************************
MAIN MENU
****************************
A
.
Manager
B
.
Customer
C
.
Exit
Enter your choice: A
Please enter your credentials to login as a manager
username: sam
2023
password: $
123
**
Success
.
You are logged in
.
**
*****************
MANAGER MODE
*******************************************
A
.
Display All Menu
B
.
Maintenance Mode
C
.
Add Menu Item
D
.
Go Back
(
Main Menu
)
Enter your choice:
1
.
Customer Mode:
in in maintenance mode, display an error massage
"The kiosk is currently undergoing repairs. We are unable to take any orders at this time. We apologize for the inconvenience."
b
.
If not in a maintenance mode, provide options to:
A
.
Display all Menu: Show the menu from "menu.txt
"
.
B
.
Place Order: Select dishes and show the final bill with taxes.
1
.
Add another item: Allows to add item to the cart
2
.
Cancel: Cancel the order and go back to "Home Menu"
3
.
Done: Show the final total price
The total price should include a tax of
7
%
.
Show the following message after user finalizes the order, and return "Home Menu".
"Your order has been taken. Please proceed to the register to pay Sx and collect your food. Thank you, and please visit again.
"[
Sx is the total order price
]
C
.
Go Back. Return to the "Home" menu.
sample output for ordering
*****************
CUSTOMER MODE
********************
A
.
Display All Menu
B
.
Place an Order
Go Back
(
Main Menu
)
Enter your choice: A
************************************
Menu
***************************************
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
No
Category
Price
Item
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Taco
7.99
Soup
5.49
Grill
8.99
Crust
12.5
Bakery
3.75
plated
19.99
Taco
8.25
Soup
Grill
7.75
Crust
4.00
El Pastor Classic
Savory pork tacos topped with pine cilantro, and onions on a corn tortilla.
Chunky Vegetable Harvest
A hearty medley of fresh garden vegetables simmered in a tomato
-
based broth.
Smokey BBQ Burger
Juicy beef patty with Be sauce, cheddar cheese, and crispy onions on a brioche bun.
Margherita Pizza
Classic pizza with fresh mozzarella, basil, and a rich tomato sauce on a thin crust.
Glazed Cinnamon Roll
Soft, fluffy pastry with a sweet cinnamon filling and a smooth glaze.
Lemon Herb Chicken
Grilled chicken breast seasoned with lemon and herbs, served with steamed vegetables.
Fish Taco Fiesta
ightly battered cod with cabbage slaw and a zesty lime crema wrapped in a flour tortilla ef Barley Deluxe
Tender chunks of beef with barley, carrots, and celery in a rich beef broth.
Mediterranean Veggie Sandwich
Grilled vegetables with feta spread on herbed focaccia bread.
Spicy Pepperoni Naan
Naan bread topped with pepperoni, jalapenos, and a blend of cheeses.
*********************************************************************************
Enter the number of dish you want to order:
1
Vegetable Harvest: $
5.49
Order Options
A
.
Done

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions