The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
SpecificationA fast food store has asked you to build an online ordering system. An order is input as a single string that mixes single digit numbers and snack ids in any order, such asb2fc = burger, 2 fries, cokefbfc = burger, 2 fries, cokeThe snacks are identified by the first character of the name. They are in three groups; the groups and cost per serve are shown below. The kitchen has 3 of each snack in stock, so they may run out of a snack. If there are not enough serves of a snack left to fill the order, ask the customer if they want to substitute a similar snack (a snack in the same group); repeat as needed. When an order has been filled, show the filled order and the cost.Main mealburger, $3.45wrap, $4.32Sidesfries, $4.20muffin, $2.50hashBrown, $4.32Drinkscoke, $1.23koffee, $2.34slurpee, $3.45tea, $4.56juice, $5.67The menu has 6 choices; a choice is a single character input:• o: order• z: zet (set) favourite order• u: use favourite order• s: show the stock left• f: exit the menu and store to file• x: exit the menu• anything else: help
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll