Hi, I'm new to C++ programming and I have to complete this project. It's a Burger King Self Service Program.
Design a Burger King self order program that accepts customer’s order and finishes the transaction. Suppose there are three types of burgers:
1. Burger ($2.00)
2. Bacon Burger ($2.50)
3. Cheese Burger ($2.50)
There are three types of drinks:
1. Diet Coke ($1.00)
2. Mountain Dew ($1.00)
3. Beer ($2.00)
Your program should run as follows,
(1). First, ask the customer which burger he/she wants.
(After customer gives the correct input.)
(2). Second, ask the customer which drink he/she wants.
(After customer gives the correct input.)
(3). Compute the total price for the customer (tax rate: 8%).
(4). Then serve the next customer until there is no customer left.
I've started it, but I am stuck on how to implement the 8% tax and computing the total cost. Help will be appreciated! Thanks!
_________________________________________________________
cout << "Okay, would you like anything to drink with that? (y/n): ";
char response;
cin >> response;
if (response == 'y')
{
cout << "Please input the choice number of the drink you desire (number) .";
}
else if (response = 'n')
cout << "Okay, your total price is ." << endl;
cin >> choice4;
if(choice4 == "4" || choice4 == "4.")
{
total == 1.00;
}
else if (choice5 == "5" || choice5 == "5.")
{
total == 1.00;
}
else (choice6 == "6" || choice6 == "6.");
{
total == 2.00;
}
if (response = 'n')
cout << "Okay, your total price is ." << endl;
system ("pause");
return 0;
}
You can accumulate the price together as the customer orders using +=.
After the customer orders choice 1, price += 2.00
Then customer orders drink4, price(2.00) += 1.00
Final price 3.00, multiply 0.92 for tax.
Or keep it the way it is, in the end have your unused total_cost = price + total; total_cost *= 0.92. And I think the operator following total should have been an assignment (=) instead of equality (==).
1 cheese burger and diet coke please :D !!!, man seriously have u coded in C before starting with C++, no method based approach or Object based approach, cmmon u cannot have all the code in main function and do everything in main function.