Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rewrite the following C++ program using classes and linked list #include #include #include using namespace std; int main() { char choice='Y'; int order = 1;

Rewrite the following C++ program using classes and linked list

#include #include #include

using namespace std;

int main() { char choice='Y';

int order = 1;

int num1=0, num2=0, num3=0, num4=0, num5=0; int num_customers; int sentinel=0; const double UnitPrice1= 1.95, UnitPrice2= 6.50,UnitPrice3= 10.25, UnitPrice4= 8.95, UnitPrice5= 14.95; double AmountofSale1=0, AmountofSale2=0, AmountofSale3=0, AmountofSale4=0, AmountofSale5=0;

cout<<"___________________Menu________________ " <<"_____(1) Buffalo Wings $1.95 (a wing) " <<"_____(2) CheeseBurger $6.50 " <<"_____(3) Steak&Fries $10.25 " <<"_____(4) Shrimp Basket $8.95 " <<"_____(5) Cajun Shrimp Pasta $14.95 ";

while (order != sentinel) { cout<<"From the menu of food, what would you like?: "; cin>>order; switch(order) { case 0: break; case 1: cout<<"How many Buffalo Wings would you like to order: "; cin>>num1; AmountofSale1 = UnitPrice1 * num1; break; case 2: cout<<"Would you like to add Lettuce, tomates and pickles to your burger?: "; cin>>num2; AmountofSale2= UnitPrice2 * num2; break; case 3: cout<<"How would you like your steak?: "; cin>>num3; AmountofSale3= UnitPrice3 * num3; break; case 4: cout<<"Shirmp basket come in small medium and large, What size would you like?: "; cin>>num4; AmountofSale4= UnitPrice4 * num4; break; case 5: cout<<"Would you like to add chicken to your pasta?: "; cin>>num5; AmountofSale5= UnitPrice5 * num5; break; default: cout<<"Please choose a valid item from our menu "; }

{

cout<<"Thank you for ordering!!: ";

cout<

cout<<"Buffalo Wings"<

cout<<"Cheeseburger:"<

cout<<"Steak&Fries:"<

cout<<"Shrimp basket:"<

cout<<"Cajun Shrimp Pasta:"<

return 0; }

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago