CODE
//Week 9 Final project:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
//declare variables
char menuChoice;
int userInputA;
int product;
int qty;
double price;
ifstream inFile;
ofstream outFile;
do
{
cout << "What would you like to do today?" << endl;//Create menu for ordering system:
cout << "A-Order new items?" << endl;//menu choice to order item (A)
cout << "B-Check new sale items?" << endl;//menu choice to check and order (B)
cout << "C-Exit ordering system." << endl;//menu choice to exit ordering system (C)
cout << "Please enter your choice: ";// prompt for entering menu choice
cin >> menuChoice;//user input menu choice
cout << "\n";//New line
switch (menuChoice)//choice A: Allow switch in case for user input to either “A” or “a”
{
case 'A':
case 'a':
// list of 5 items for user to chose from
cout << "Please chose which item you would like to order:" << endl;
cout << "0-Body Dew Spray-11.00." << endl;//item number 1 body spray
cout << "1-Cherry Body Butter-9.50." << endl;//item number 2 body lotion
cout << "2-Slumber Bubbles-11.50." << endl;//item number 3 bubble bath
cout << "3-Scented Massage Oil Candle-15.00." << endl;//item number 4 candle
cout << "4-Sensura Massage Oil-14.00." << endl;//item number 5 massage oil
cin >> product; //user input item number
//array goes here
//if item number 0 price = 11.00
//if item number 1 price = 9.50
//if item number 2 price = 11.50
//if item number 3 price = 15.00
//if item number 4 price = 14.00
//once item number is selected price is shown prompt user for quantity
//once quantity chosen show total
//then show menu for next selection
// once all items chosen add all prices together for total
// generate order number to be cast from input file i.e 001, 002, 003, 004, etc
//order number and total sent to output file
break;
//choice b:
case 'B':
case 'b':
cout << "Current Sale Items are" << endl;
cout << "Cherry Body Butter 11.50 to 9.50" << endl;
cout << "Body Dew Spray 12.50 to 11.00" << endl;
//prompt user to enter order number
//prompt user to enter date ordered
//show order number
//show date + 14days delivery time(your order will arrive --------)
break;
//choice c:
case 'C':
case 'c':
cout << "Thank you for your order, have a nice day!!!" << endl; // nice little exit message
exit (0);
default: // this is in case the user enters an option other then those given in which case they will get an error
// message and will be prompted to make another choice
if (menuChoice != 'a' || menuChoice != 'A' || menuChoice != 'b' || menuChoice != 'B' || menuChoice != 'c' || menuChoice != 'C')
cout << "That is an invalid selection, please try again." << endl;
break;
}
}while (menuChoice != 'C' || menuChoice != 'c');
return 0;
//exit ordering system
}
can somone help me here, I am not sure about the array and string values here. I am trying to get this done quickly as its due in 3 hours. And is there a way that I can print indata information to the console for the purposes of maybe changing option b to a wish list?