Message

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

class login //Login Class

{
public:
string username, cashier1, cashier2, cashier3, password, password1,
password2, password3;

void greating()
{
cout<<"--------------------------------------"<<endl;
cout<<"Welcome to Miyushi Cafe"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"Please enter your username"<<endl;
cin>>username;
}

void passwordstatement()
{
cout<<"Hello "<<username<<endl;
cout<<"Please provide a password"<<endl;
cin>>password;
}

void validation()
{
cout<<"Your login was sucssesful."<<endl;
cout<<"Welcome "<<username<<endl;
}

void error()
{
cout<<"Invaild entry please try again."<<endl;
}
};

class menu //MENU CLASS


{
public:
float sandwiches, doughnuts, coffee, tea, waffles, pancakes, icecream,
mochi, bobaTea, cupcakes, cookies, macaroon, water, coffeejelly, omlettes,
frenchToast, fruitJuice;
int quantity, selection, decision, choice;
char option;

void menue()
{
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
cout<<"MIYUSHI CAFE MENU"<<endl;
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
cout<<"-----------------------------------"<<endl;
cout<<"Please select a catergory"<<endl;
cout<<"Note: Case Sensitive"<<endl;
cout<<"-----------------------------------"<<endl;
cout<<"\n\t A. BREAKFAST"<<endl;
cout<<"\n\t B. DRINKS"<<endl;
cout<<"\n\t C. DESSERTS"<<endl;
cout<<"-----------------------------------"<<endl;
cout<<"Please select an option"<<endl;
cin>>option;
}

void breakfast()
{
cout<<"-------------------------------------"<<endl;
cout<<"\t BREAKFAST MENU"<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"\n\t 1. Waffles.........$4.50"<<endl;
cout<<"\n\t 2. Pancakes........$5.00"<<endl;
cout<<"\n\t 3. Sandwiches......$5.50"<<endl;
cout<<"\n\t 4. Omelettes.......$4.00"<<endl;
cout<<"\n\t 5. French Toast....$2.00"<<endl;
cin>>selection;
cout<<"Enter quantity";
cin>>quantity;
}

void drinks()
{
cout<<"-------------------------------------"<<endl;
cout<<"\t DRINKS MENU"<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"\n\t 6. Coffee..........$6.00"<<endl;
cout<<"\n\t 7. Tea.............$4.75"<<endl;
cout<<"\n\t 8. Boba Tea........$7.00"<<endl;
cout<<"\n\t 9. Water...........$3.00"<<endl;
cout<<"\n\t 10. Fruit Juice....$5.00"<<endl;
cin>>choice;
cout<<"Enter quantity";
cin>>quantity;
}

void desserts()
{
cout<<"-------------------------------------"<<endl;
cout<<"\t DESSERTS MENU"<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"\n\t 11. Doughnuts......$2.00"<<endl;
cout<<"\n\t 12. Mochi..........$2.50"<<endl;
cout<<"\n\t 13. Cupcakes.......$4.00"<<endl;
cout<<"\n\t 14. Ice-Cream......$5.50"<<endl;
cout<<"\n\t 15. Coffee Jelly...$7.75"<<endl;
cout<<"\n\t 16. Macaroon.......$5.00"<<endl;
cin>>choice;
cout<<"Enter quantity";
cin>>quantity;
}
};

int main()
{
float total, subtotal, delivery=5.50, dFee;
int count=0, counter=0, attempt, action, Roseau=0, Canefield=2.5, Goodwill=2,
Portsmouth=10, Grandbay=12;
string answer, response;
char address;

login logob;
logob.username, logob.cashier1="Thoma", logob.cashier2="Diluc",
logob.cashier3="Bennett", logob.password, logob.password1="w@rmbl3ssing",
logob.password2="phe0niX", logob.password3="unLucky1";

menu menuOb;

menuOb.waffles=4.50, menuOb.pancakes=5.00, menuOb.sandwiches=5.50,


menuOb.omlettes=4.00, menuOb.frenchToast=2.00, menuOb.coffee=6.00, menuOb.tea=4.75,
menuOb.bobaTea=7.00, menuOb.water=3.00, menuOb.fruitJuice=5.00,
menuOb.doughnuts=2.00, menuOb.mochi=2.50, menuOb.cupcakes=4.00,
menuOb.icecream=5.50, menuOb.coffeejelly=7.75, menuOb.macaroon=5.00;

logob.greating();
if(logob.username==logob.cashier1 || logob.username==logob.cashier2 ||
logob.username==logob.cashier3)
{
logob.passwordstatement();

if(logob.username==logob.cashier1&&logob.password==logob.password1 ||
logob.username==logob.cashier2&&logob.password2==logob.password2 ||
logob.username==logob.cashier3&&logob.password==logob.password3)
{
logob.validation();
system("pause");
system("CLS");
menuOb.menue();
if(menuOb.option=='A')
{
menuOb.breakfast();
if(menuOb.selection==1)
{
subtotal = menuOb.quantity * menuOb.waffles;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==2)
{
subtotal = menuOb.quantity * menuOb.pancakes;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==3)
{
subtotal = menuOb.quantity * menuOb.sandwiches;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==4)
{
subtotal = menuOb.quantity * menuOb.omlettes;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==5)
{
subtotal = menuOb.quantity * menuOb.frenchToast;
cout<<"Subtotal $"<<subtotal<<endl;
}
}

if(menuOb.option=='B')
{
menuOb.drinks();
if(menuOb.choice==6)
{
subtotal = menuOb.quantity * menuOb.coffee;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==7)
{
subtotal = menuOb.quantity * menuOb.tea;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==8)
{
subtotal = menuOb.quantity * menuOb.bobaTea;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==9)
{
subtotal = menuOb.quantity * menuOb.water;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==10)
{
subtotal = menuOb.quantity * menuOb.fruitJuice;
cout<<"Subtotal $"<<subtotal<<endl;
}
}

if(menuOb.option=='C')
{
menuOb.desserts();
if(menuOb.choice==11)
{
subtotal = menuOb.quantity * menuOb.doughnuts;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==12)
{
subtotal = menuOb.quantity * menuOb.mochi;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==13)
{
subtotal = menuOb.quantity * menuOb.cupcakes;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==14)
{
subtotal = menuOb.quantity * menuOb.icecream;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==15)
{
subtotal = menuOb.quantity * menuOb.coffeejelly;
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==16)
{
subtotal = menuOb.quantity * menuOb.macaroon;
cout<<"Subtotal $"<<subtotal<<endl;
}
}

Sleep(400);
cout<<"type yes to continue shopping or
no to checkout."<<endl;
cin>>answer;
if(answer=="yes")
{

do
{
menuOb.menue();
if(menuOb.option=='A')
{
menuOb.breakfast();
if(menuOb.selection==1)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.waffles);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==2)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.pancakes);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==3)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.sandwiches);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==4)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.omlettes);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.selection==5)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.frenchToast);
cout<<"Subtotal $"<<subtotal<<endl;
}
}

if(menuOb.option=='B')
{
menuOb.drinks();
if(menuOb.choice==6)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.coffee);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==7)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.tea);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==8)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.bobaTea);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==9)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.water);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==10)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.fruitJuice);
cout<<"Subtotal $"<<subtotal<<endl;
}
}

if(menuOb.option=='C')
{
menuOb.desserts();
if(menuOb.choice==11)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.doughnuts);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==12)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.mochi);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==13)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.cupcakes);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==14)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.icecream);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==15)
{
subtotal =subtotal + (menuOb.quantity *
menuOb.coffeejelly);
cout<<"Subtotal $"<<subtotal<<endl;
}
if(menuOb.choice==16)
{
subtotal = subtotal + (menuOb.quantity *
menuOb.macaroon);
cout<<"Subtotal $"<<subtotal<<endl;
}
}
Sleep(400);
cout<<"Please enter 'yes' to continue
shopping or 'no' to checkout."<<endl;
cin>>response;

} while(response=="yes");

cout<<"Please enter an address"<<endl;


cout<<"\n\t A. Roseau"<<endl;
cout<<"\n\t B. Canefield"<<endl;
cout<<"\n\t C. Goodwill"<<endl;
cout<<"\n\t D. Portsmouth"<<endl;
cout<<"\n\t E. Grandbay"<<endl;
cin>>address;
if(address=='A')
{
dFee= delivery * Roseau;
cout<<"Your Delivery fee is $"<<dFee;

}
if(address=='B')
{
dFee= delivery * Canefield;
cout<<"Your Delivery fee is $"<<dFee;

}
if(address=='C')
{
dFee= delivery * Goodwill;
cout<<"Your Delivery fee is $"<<dFee;

}
if(address=='D')
{
dFee= delivery * Portsmouth;
cout<<"Your Delivery fee is $"<<dFee;

}
if(address=='E')
{
dFee= delivery * Grandbay;
cout<<"Your Delivery fee is $"<<dFee;

total=subtotal + dFee;
cout<<"\n Your order total is $"<<total;
cout<<"\n End of your order. Thank you ordering at the
Miyushi Cafe"<<endl;
}
else
{
logob.error();
}
}
else
{
logob.error();
}
}
}

You might also like