Zombie Sandwich Shop
The BRAINS! Vision
BRAINS! caters to a clientele that is extremely specific in their needs, demanding in their requirements, and hungry for BRAINS.
Your Task
Help the staff of BRAINS! provide speedier service by creating a cash register (point-of-sale) system that allows the cashier to quickly select items off the menu as they are SHRIEKED by the customer and quickly totals those items, applies sales tax, and reveals the total.
Items on the Menu
Thala Mustard-Crusted Filet - $17.50
Hypotha Moussaka - $12.95
Amyg-DAL-a - $11.56
HIPpocampus & Dip- $7.99
Pons Pasta Special - $15.00
Medulla Frittata - $9.99
Finish Current Sale + Start a New Sale
Quit Forever - APOCALYPSE
What Else You Need to Know
Maryland sales tax is 6% (even for zombies).
Your program should offer the items as a menu that makes it clear what the cashier should press to indicate that item.
The program should run until they choose the option to just GIVE UP ENTIRELY (8) (close out the system completely) because the apocalypse is at hand! Up until that point, the cashier should be allowed to continue to add items to the order, one item at a time. The total should accumulate as the program runs.
If the cashier enters a non-menu option (malicious input - like -10 or 255), the program should urge them to HURRY! And display the menu again.
Once the cashier selects the option to total the sale, sales tax should be calculated and displayed, and the total before and after tax should be displayed. Ensure that it looks like MONEY (2 decimal places).
Once the total has been displayed, output a few blank lines on screen. The total for the previous sale should be cleared (back to 0), and the menu of options displayed again. If they choose the final option labeled apocalypse, end the program completely (break the loop).
Make sure to include labels with any output to explain what numbers represent.
Output a few blank lines and redisplay the menu each time a new input is entered.
My code so far; no need to do it for me duh!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#include <iostream>
using namespace std;
int main() {
constexpr auto filet {17.50};
// Thala Mustard-Crusted Filet
constexpr auto moussaka {12.95};
// Hypotha Moussaka
constexpr auto amyg {11.56};
// Amyg-DAL-a
constexpr auto dip {7.99};
// HIPpocampus & Dip
constexpr auto pasta {15.00};
// Pons Pasta Special
constexpr auto frittata {9.99};
// Medulla Frittata
constexpr auto {};
//
constexpr auto {};
//
}
| |
Im not sure what to add in the last constexpr autos.