Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.02 KB | None | 0 0
  1. #include<iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5.  
  6.  
  7.  
  8.  
  9. class Bank
  10. {
  11.  
  12.  
  13. public :
  14. string email;
  15. string pass;
  16. string adress;
  17. double account; //add money
  18.  
  19.  
  20. double getaccount()
  21. {
  22. return account;
  23. }
  24.  
  25.  
  26. virtual void getadress2()//virtual
  27. {
  28.  
  29. }
  30.  
  31.  
  32. };
  33.  
  34. /*#########################################################################################*/
  35.  
  36. class btcoin : public Bank //inheritance
  37. {
  38. private:
  39.  
  40. Bank bank;//composition
  41.  
  42. public:
  43. btcoin(){
  44. }
  45.  
  46.  
  47.  
  48.  
  49.  
  50. void getadress2()//function that can be use from bank
  51. {
  52. hevar://goto
  53. cout<<"send money to one pf these adress: \n";/*adress for the user, the user must send money to one of these adress if they send the money they will wright that adress*/
  54. cout<<"1J9JNPJ6nZ19EnanQMfmReSyFFq7j9ZxuF\n"<< endl; /*that they send money*/
  55. cout<<"1HcK14bPd3cs1ztNpwK79b7vwDEN5jysgA\n"<< endl;
  56. cout<<"3EKTujhztuB3XM4aSakb9idiTU3JdgHh1x\n"<< endl;
  57. cout<<"3AcLpcDX3xHAUdUvZLn6Xsyk4w6bUMkVu6\n\n\n"<< endl;
  58.  
  59. cin>>bank.adress;//wright one of these adress
  60. if(bank.adress!="1J9JNPJ6nZ19EnanQMfmReSyFFq7j9ZxuF" && bank.adress!="1HcK14bPd3cs1ztNpwK79b7vwDEN5jysgA" //btcoin adress u have to send money to one of these adress
  61. && bank.adress!="3EKTujhztuB3XM4aSakb9idiTU3JdgHh1x" & bank.adress!="3AcLpcDX3xHAUdUvZLn6Xsyk4w6bUMkVu6" )//the program say error and start again
  62. {
  63. cout<<"\n----------------------------";
  64. cout<<"\n\nError 404 \n";
  65. goto hevar;
  66. }
  67. cout<<endl;
  68. }
  69.  
  70. };
  71.  
  72. /*##################################################################*/
  73.  
  74. class paypal : public Bank //inheritance
  75. {
  76. private:
  77. Bank bank;//composition
  78.  
  79. public:
  80. paypal(){}
  81.  
  82. void getadress2() //function that can be use from bank
  83. {
  84. cout<<"Please write your email : \n>";//in paypal you just have to wright your email and password it will automatically send the money
  85. cin.ignore();
  86. getline(cin,bank.email);
  87. cout<<endl;
  88.  
  89. cout<<"Please write your pass :\n>";
  90. cin.ignore();
  91. getline(cin,bank.pass);
  92. cout<<endl;
  93. }
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. };
  102.  
  103. /*################################################################################################*/
  104.  
  105. class Menu
  106. {
  107. string dish1 , dish2 , dish3 , dish4 , dish5;//menu of the food
  108.  
  109. double cost1 , cost2 ,cost3 , cost4 , cost5 ;//cost of the food
  110.  
  111.  
  112.  
  113. public :
  114.  
  115. Menu(string d1="None" , string d2="None" , string d3="None" , string d4="None" ,string d5="None" ,//default
  116. double c1=00 , double c2=00 , double c3=00 , double c4=00 , double c5=00)//default
  117. {
  118. dish1=d1;
  119. dish2=d2;
  120. dish3=d3;
  121. dish4=d4;
  122. dish5=d5;
  123.  
  124. cost1=c1;
  125. cost2=c2;
  126. cost3=c3;
  127. cost4=c4;
  128. cost5=c5;
  129. }
  130.  
  131. //accessor menu
  132. string getdish1()
  133. {
  134. return dish1;
  135. }
  136.  
  137.  
  138. string getdish2()
  139. {
  140. return dish2;
  141. }
  142.  
  143. string getdish3()
  144. {
  145. return dish3;
  146. }
  147.  
  148. string getdish4()
  149. {
  150. return dish4;
  151. }
  152.  
  153. string getdish5()
  154. {
  155. return dish5;
  156. }
  157.  
  158. //////////////////accessor cost
  159. double getcost1()
  160. {
  161. return cost1;
  162. }
  163.  
  164.  
  165. double getcost2()
  166. {
  167. return cost2;
  168. }
  169.  
  170. double getcost3()
  171. {
  172. return cost3;
  173. }
  174.  
  175.  
  176. double getcost4()
  177. {
  178. return cost4;
  179. }
  180.  
  181. double getcost5()
  182. {
  183. return cost5;
  184. }
  185.  
  186. friend ostream &operator<<(ostream &out , Menu &m)//display the menu
  187. {
  188.  
  189.  
  190. out<<"\n\n------------Menu------------------------------------\n\n";
  191. out<<"Number"<<setw(15)<<"Dishes"<<setw(20)<<"Price"<<endl<<endl;
  192.  
  193.  
  194. out<<"1-"<<setw(20)<<m.dish1<<setw(18)<<m.cost1<<"$"<<endl;
  195. out<<"2-"<<setw(20)<<m.dish2<<setw(19)<<m.cost2<<"$"<<endl;
  196. out<<"3-"<<setw(20)<<m.dish3<<setw(18)<<m.cost3<<"$"<<endl;
  197. out<<"4-"<<setw(20)<<m.dish4<<setw(18)<<m.cost4<<"$"<<endl;
  198. out<<"5-"<<setw(20)<<m.dish5<<setw(18)<<m.cost5<<"$"<<endl;
  199.  
  200. }
  201.  
  202. };
  203.  
  204. /*#####################################################################################################################*/
  205.  
  206. class Staff
  207. {
  208. private :
  209. string name;
  210. int age;
  211. double salary;
  212.  
  213.  
  214. public :
  215. Staff(string n , int a , double s)//constructor
  216. {
  217. name=n;
  218. age=a;
  219. salary=s;
  220. }
  221.  
  222. //accessor
  223. string getname()
  224. {
  225. return name;
  226. }
  227.  
  228. int getage()
  229. {
  230. return age;
  231. }
  232.  
  233. double getsalary()
  234. {
  235. return salary;
  236. }
  237.  
  238.  
  239. };
  240.  
  241. /*#####################################################################################################################*/
  242.  
  243.  
  244. class Restaurant
  245. {
  246.  
  247.  
  248.  
  249. public :
  250. Menu menu; //composition
  251. Bank bank; //composition
  252. Staff *s; //aggregation
  253. Restaurant(string d1,string d2,string d3,string d4,string d5 //constructor
  254. ,double c1 ,double c2,double c3,double c4,double c5) : menu(d1,d2,d3,d4,d5,c1,c2,c3,c4,c5)
  255.  
  256. { }
  257.  
  258. Restaurant ()//constructor
  259. {
  260.  
  261. }
  262. void setpointer(Staff *R)//to set pointer
  263. {
  264. s=R;
  265. }
  266.  
  267. void getMenu()//display menu
  268. {
  269.  
  270.  
  271. cout<<menu;
  272.  
  273. }
  274.  
  275. void getstaff()
  276. {
  277.  
  278. cout<<s->getname()<<setw(20)<<s->getage()<<setw(20)<<s->getsalary()<<endl;//display the staff information
  279. }
  280.  
  281.  
  282.  
  283.  
  284.  
  285. };
  286. /*#####################################################################################################################*/
  287.  
  288. class Costumer
  289. {
  290. private :
  291. string name;
  292. string adress;
  293. string phone;
  294. string comment;
  295.  
  296. Bank *bank;//aggregation
  297.  
  298.  
  299.  
  300. public:
  301. //just for print
  302. void getinput()
  303. {
  304. int walam;
  305. cout<<"1.paypal or 2.cash or 3.bitcoin\n";//for the user if the want in which way they want to pay
  306. cin>>walam;
  307.  
  308. if(walam==1)
  309. {
  310. bank = new paypal ;//paypal
  311. bank->getadress2(); //display function getadress2 in fuction getinput
  312. }
  313. if(walam==2)
  314. {
  315. cout<<"Please put your name \n>";//cash
  316. cin.ignore();
  317. getline(cin,name);
  318. cout<<endl;
  319.  
  320. cout<<"Please put your adress :\n>";
  321. cin.ignore();
  322. getline(cin,adress);
  323. cout<<endl;
  324.  
  325. cout<<"Please put you phone number so we call incase something went wrong :\n>";
  326. cin.ignore();
  327. getline(cin,phone);
  328.  
  329. cout<<"Any details about your food ?\n>";
  330. cin.ignore();
  331. getline(cin,comment);
  332. }
  333.  
  334. if(walam==3)
  335. {
  336. bank = new btcoin ;//btcoin
  337. bank->getadress2(); //display function getadress2 in fuction getinput
  338. }
  339.  
  340. }
  341.  
  342. //monitors
  343. void setname(string n)
  344. {
  345.  
  346. name=n;
  347. }
  348.  
  349.  
  350. void setage(string a)
  351. {
  352.  
  353. adress=a;
  354.  
  355. }
  356.  
  357. void setphone(string p)
  358. {
  359. phone=p;
  360. }
  361.  
  362.  
  363.  
  364. };
  365.  
  366.  
  367. ///////////////////////////////////////////////////////////////////////////////
  368.  
  369.  
  370.  
  371. int main()
  372. {
  373. int ccount=0;
  374. double x;
  375. string answer1, answer , order;
  376.  
  377. Restaurant kurdish_restaurant("Dolma","Sarwpe","Kfta","Bryany","Shfta",9,15,8,7,5);//menu & cost of kurdish resturant
  378. Restaurant fastfood_restaurant("Burger","Shwarma","Finger","Saj","Pizza",3,2,1,3,6);//menu & cost of fastt resturant
  379. Restaurant mixed_restaurant("Rice and Soup","BBQ Meat","BBQ Chicken","Salad","Kebab",2,3,4,3,4);//menu & cost of mixed resturant
  380. Costumer costumer[100];
  381.  
  382. Staff *staffs[3]={new Staff("hama ",18,500) , new Staff("hevar ",19,600),new Staff("paywand",12,100)};//staff information
  383. Restaurant R;
  384.  
  385.  
  386.  
  387.  
  388.  
  389. cout<<"\twelcome to vikings delivery";
  390. cout<<"\n\t Free Delivery ;)\n\n";
  391. cout<<"Our staff members are :\n\n";
  392.  
  393. //iomanip
  394. cout<<"Name"<<setw(24)<<"Age"<<setw(20)<<"Salary"<<endl;
  395. for(int i=0;i<3;i++)//for loop
  396. {
  397. R.setpointer(staffs[i]);//display staff
  398. R.getstaff();
  399. }
  400. cout<<endl<<endl;
  401. choose://goto
  402. cout<<"Which restaurant do you want to choose ?\n\n";
  403. cout<<"1- Kurdish food \n";
  404. cout<<"2- Fast food\n";
  405. cout<<"3- Mixed food\n>";
  406.  
  407. cin>>answer;
  408.  
  409.  
  410.  
  411. if(answer=="1")//if for cin >>answer
  412. {
  413.  
  414.  
  415. cout<<"\n\nWelcome to kurdish restaurant <3\n\n";
  416. again://goto
  417. kurdish_restaurant.getMenu();//display menu
  418.  
  419. cout<<"\n\nWhat do you want to order\n>";
  420. cin>>order;
  421.  
  422. if(order=="1")
  423. {
  424.  
  425.  
  426. x+=kurdish_restaurant.menu.getcost1();//sum the cost
  427.  
  428. kurdish_restaurant.bank.account+=x;//store the cost
  429.  
  430. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  431. cin.ignore();
  432. getline(cin,answer1);
  433.  
  434. if(answer1=="1")
  435. {
  436. goto again;
  437. }
  438.  
  439. if(answer1=="2")
  440. { //display the total cost
  441. cout<<"\n\nIt will cost you : "<<kurdish_restaurant.bank.account<<"$"<<endl<<endl;
  442.  
  443. costumer[ccount].getinput();//display getinput function
  444.  
  445. cout<<"Thank you for ordering food at kurdish restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  446. }
  447. if(answer1=="3")
  448. {
  449. goto choose; //when the user right down 3 which is different restaurant it will go to (choose:) i use goto instead of do - while it's more easier but not accurate every time
  450. }
  451.  
  452. }
  453.  
  454.  
  455. if(order=="2")
  456. {
  457.  
  458.  
  459.  
  460. x+=kurdish_restaurant.menu.getcost2();
  461.  
  462. kurdish_restaurant.bank.account+=x;
  463.  
  464.  
  465. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  466. cin.ignore();
  467. getline(cin,answer1);
  468.  
  469. if(answer1=="1")
  470. {
  471. goto again;
  472. }
  473.  
  474. if(answer1=="2")
  475. {cout<<"\n\nIt will cost you : "<<kurdish_restaurant.bank.account<<"$"<<endl<<endl;
  476. costumer[ccount].getinput();
  477. cout<<"Thank you for ordering food at kurdish restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  478. }
  479. if(answer1=="3")
  480. {
  481. goto choose;
  482. }
  483.  
  484.  
  485. }
  486.  
  487.  
  488. if(order=="3")
  489. {
  490.  
  491.  
  492.  
  493. x+=kurdish_restaurant.menu.getcost3();
  494.  
  495. kurdish_restaurant.bank.account+=x;
  496.  
  497.  
  498. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  499. cin.ignore();
  500. getline(cin,answer1);
  501.  
  502.  
  503. if(answer1=="1")
  504. {
  505. goto again;
  506. }
  507.  
  508. if(answer1=="2")
  509. {cout<<"\n\nIt will cost you : "<<kurdish_restaurant.bank.account<<"$"<<endl<<endl;
  510. costumer[ccount].getinput();
  511. cout<<"Thank you for ordering food at kurdish restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  512. }
  513. if(answer1=="3")
  514. {
  515. goto choose;
  516. }
  517.  
  518.  
  519. }
  520.  
  521.  
  522. if(order=="4")
  523. {
  524.  
  525.  
  526.  
  527. x+=kurdish_restaurant.menu.getcost4();
  528.  
  529. kurdish_restaurant.bank.account+=x;
  530.  
  531.  
  532. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  533. cin.ignore();
  534. getline(cin,answer1);
  535.  
  536. if(answer1=="1")
  537. {
  538. goto again;
  539. }
  540.  
  541. if(answer1=="2")
  542. {cout<<"\n\nIt will cost you : "<<kurdish_restaurant.bank.account<<"$"<<endl<<endl;
  543.  
  544. costumer[ccount].getinput();
  545. cout<<"Thank you for ordering food at kurdish restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  546. }
  547. if(answer1=="3")
  548. {
  549. goto choose;
  550. }
  551.  
  552.  
  553. }
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560. if(order=="5")
  561. {
  562.  
  563.  
  564.  
  565. x+=kurdish_restaurant.menu.getcost5();
  566.  
  567. kurdish_restaurant.bank.account+=x;
  568.  
  569.  
  570. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  571. cin.ignore();
  572. getline(cin,answer1);
  573.  
  574. if(answer1=="1")
  575. {
  576. goto again;
  577. }
  578.  
  579. if(answer1=="2")
  580. {cout<<"\n\nIt will cost you : "<<kurdish_restaurant.bank.account<<"$"<<endl<<endl;
  581.  
  582. costumer[ccount].getinput();
  583.  
  584. cout<<"\n\nThank you for ordering food at kurdish restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  585. }
  586.  
  587. if(answer1=="3")
  588. {
  589. goto choose;
  590. }
  591.  
  592.  
  593. }
  594.  
  595.  
  596. }
  597.  
  598.  
  599.  
  600.  
  601. if(answer=="2")
  602. {
  603. cout<<"\nWelcome to fast food restaurant \n\n";
  604. again2:
  605. fastfood_restaurant.getMenu();
  606.  
  607.  
  608. cout<<"\n\nWhat do you want to order\n>";
  609. cin>>order;
  610.  
  611. if(order=="1")
  612. {
  613.  
  614.  
  615.  
  616. x+=fastfood_restaurant.menu.getcost1();
  617.  
  618. fastfood_restaurant.bank.account+=x;
  619.  
  620.  
  621. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  622. cin.ignore();
  623. getline(cin,answer1);
  624.  
  625. if(answer1=="1")
  626. {
  627. goto again2;
  628. }
  629.  
  630. if(answer1=="2")
  631. {
  632. cout<<"\n\nIt will cost you : "<<fastfood_restaurant.bank.account<<"$"<<endl<<endl;
  633. costumer[ccount].getinput();
  634. cout<<"Thank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  635. }
  636. if(answer1=="3")
  637. {
  638. goto choose;
  639. }
  640.  
  641. }
  642.  
  643.  
  644. if(order=="2")
  645. {
  646.  
  647.  
  648. x+=fastfood_restaurant.menu.getcost2();
  649.  
  650. fastfood_restaurant.bank.account+=x;
  651.  
  652. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  653. cin.ignore();
  654. getline(cin,answer1);
  655.  
  656. if(answer1=="1")
  657. {
  658. goto again2;
  659. }
  660.  
  661. if(answer1=="2")
  662. {
  663. cout<<"\n\nIt will cost you : "<<fastfood_restaurant.bank.account<<"$"<<endl<<endl;
  664. costumer[ccount].getinput();
  665. cout<<"Thank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  666. }
  667. if(answer1=="3")
  668. {
  669. goto choose;
  670. }
  671.  
  672.  
  673. }
  674.  
  675.  
  676. if(order=="3")
  677. {
  678.  
  679.  
  680. x+=fastfood_restaurant.menu.getcost3();
  681.  
  682. fastfood_restaurant.bank.account+=x;
  683.  
  684. cout<<"Do you want to order something else (yes/no/different restaurant)?\n";
  685. cin.ignore();
  686. getline(cin,answer1);
  687.  
  688. if(answer1=="1")
  689. {
  690. goto again2;
  691. }
  692.  
  693. if(answer1=="2")
  694. {
  695. cout<<"\n\nIt will cost you : "<<fastfood_restaurant.bank.account<<"$"<<endl<<endl;
  696. costumer[ccount].getinput();
  697. cout<<"Thank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  698. }
  699.  
  700. if(answer1=="3")
  701. {
  702. goto choose;
  703. }
  704.  
  705. }
  706.  
  707.  
  708. if(order=="4")
  709. {
  710.  
  711.  
  712. x+=fastfood_restaurant.menu.getcost4();
  713.  
  714. fastfood_restaurant.bank.account+=x;
  715.  
  716. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  717. cin.ignore();
  718. getline(cin,answer1);
  719.  
  720. if(answer1=="1")
  721. {
  722. goto again2;
  723. }
  724.  
  725. if(answer1=="2")
  726. {
  727. cout<<"\n\nIt will cost you : "<<fastfood_restaurant.bank.account<<"$"<<endl<<endl;
  728. costumer[ccount].getinput();
  729. cout<<"Thank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  730. }
  731. if(answer1=="3")
  732. {
  733. goto choose;
  734. }
  735.  
  736.  
  737. }
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744. if(order=="5")
  745. {
  746.  
  747.  
  748. x+=fastfood_restaurant.menu.getcost5();
  749.  
  750. fastfood_restaurant.bank.account+=x;
  751.  
  752. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  753. cin.ignore();
  754. getline(cin,answer1);
  755.  
  756. if(answer1=="1")
  757. {
  758. goto again2;
  759. }
  760.  
  761. if(answer1=="2")
  762. {
  763. cout<<"\n\nIt will cost you : "<<fastfood_restaurant.bank.account<<"$"<<endl<<endl;
  764. costumer[ccount].getinput();
  765. cout<<"\n\nThank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  766. }
  767. if(answer1=="3")
  768. {
  769. goto choose;
  770. }
  771.  
  772.  
  773. }
  774.  
  775. }
  776.  
  777. if(answer=="3")
  778. {
  779. cout<<"\nWelcome to fast food restaurant \n\n";
  780. again3:
  781. mixed_restaurant.getMenu();
  782.  
  783.  
  784. cout<<"\n\nWhat do you want to order\n>";
  785. cin>>order;
  786.  
  787. if(order=="1")
  788. {
  789.  
  790.  
  791. x+=mixed_restaurant.menu.getcost1();
  792.  
  793. mixed_restaurant.bank.account+=x;
  794.  
  795. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  796. cin.ignore();
  797. getline(cin,answer1);
  798.  
  799. if(answer1=="1")
  800. {
  801. goto again3;
  802. }
  803.  
  804. if(answer1=="2")
  805. {
  806. cout<<"\n\nIt will cost you : "<<mixed_restaurant.bank.account<<"$"<<endl<<endl;
  807. costumer[ccount].getinput();
  808. cout<<"Thank you for ordering food at mixed restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  809. }
  810. if(answer1=="3")
  811. {
  812. goto choose;
  813. }
  814.  
  815.  
  816. }
  817.  
  818.  
  819. if(order=="2")
  820. {
  821.  
  822.  
  823. x+=mixed_restaurant.menu.getcost2();
  824.  
  825. mixed_restaurant.bank.account+=x;
  826.  
  827. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  828. cin.ignore();
  829. getline(cin,answer1);
  830.  
  831. if(answer1=="1")
  832. {
  833. goto again3;
  834. }
  835.  
  836. if(answer1=="2")
  837. {
  838. cout<<"\n\nIt will cost you : "<<mixed_restaurant.bank.account<<"$"<<endl<<endl;
  839. costumer[ccount].getinput();
  840. cout<<"Thank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  841. }
  842. if(answer1=="3")
  843. {
  844. goto choose;
  845. }
  846.  
  847.  
  848. }
  849.  
  850.  
  851. if(order=="3")
  852. {
  853.  
  854.  
  855. x+=mixed_restaurant.menu.getcost3();
  856.  
  857. mixed_restaurant.bank.account+=x;
  858.  
  859. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  860. cin.ignore();
  861. getline(cin,answer1);
  862.  
  863. if(answer1=="1")
  864. {
  865. goto again3;
  866. }
  867.  
  868. if(answer1=="2")
  869. {
  870. cout<<"\n\nIt will cost you : "<<mixed_restaurant.bank.account<<"$"<<endl<<endl;
  871. costumer[ccount].getinput();
  872. cout<<"Thank you for ordering food at fast food restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  873. }
  874. if(answer1=="3")
  875. {
  876. goto choose;
  877. }
  878.  
  879.  
  880. }
  881.  
  882.  
  883. if(order=="4")
  884. {
  885.  
  886.  
  887. x+=mixed_restaurant.menu.getcost4();
  888.  
  889. mixed_restaurant.bank.account+=x;
  890.  
  891. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  892. cin.ignore();
  893. getline(cin,answer1);
  894.  
  895. if(answer1=="1")
  896. {
  897. goto again3;
  898. }
  899.  
  900. if(answer1=="2")
  901. {
  902. cout<<"\n\nIt will cost you : "<<mixed_restaurant.bank.account<<"$"<<endl<<endl;
  903. costumer[ccount].getinput();
  904. cout<<"Thank you for ordering food at mixed restaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  905. }
  906. if(answer1=="3")
  907. {
  908. goto choose;
  909. }
  910.  
  911.  
  912. }
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919. if(order=="5")
  920. {
  921.  
  922.  
  923.  
  924. x+=mixed_restaurant.menu.getcost5();
  925.  
  926. mixed_restaurant.bank.account+=x;
  927.  
  928.  
  929. cout<<"Do you want to order something else (1.yes/2.no/3.different restaurant)?\n";
  930. cin.ignore();
  931. getline(cin,answer1);
  932.  
  933. if(answer1=="1")
  934. {
  935. goto again3;
  936. }
  937.  
  938. if(answer1=="2")
  939. {cout<<"\n\nIt will cost you : "<<mixed_restaurant.bank.account<<"$"<<endl<<endl;
  940. costumer[ccount].getinput();
  941. cout<<"\n\nThank you for ordering food at mixedrestaurant \nyour food will be there in 30 minutes :)\nbye untill next time ...\n";
  942. }
  943. if(answer1=="3")
  944. {
  945. goto choose;
  946. }
  947.  
  948.  
  949. }
  950.  
  951. }
  952.  
  953.  
  954.  
  955. return 0;
  956. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement