Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Holden Chambers
- '12-2-19
- 'StarBucks ordering system
- 'Emulates an ordering system for Starbucks
- 'MenuOpen, checks if the menu is open
- 'CurrentCatagory$, stores what catagory the user has selected to print later
- 'CurrentCatagory, stores what catagory the user has selected for use in determining what item is selected when a customer orders more of an item
- 'CurrentItem$, stores the selected item to be printed later
- 'CurrentItem, stores the selected item to for use in checking what item has been bought it more then 1 is purchased
- 'ItemAmount, the amount of the selected item that is being purchased
- UpperLeftX = 1
- UpperLeftY = 1
- WindowHeight = 900
- WindowWidth = 400
- 'Starting buttons
- button #Menu1.HotCoffee, "Hot Coffees", [HotCoffee], UL, 100, 100, 100, 50
- button #Menu1.ColdCoffee, "Cold Coffees", [ColdCoffee], UL, 200, 100, 100, 50
- button #Menu1.HotTea, "Hot Teas", [HotTeas], UL, 100, 150, 100, 50
- button #Menu1.IcedTea, "Iced Teas", [IcedTeas], UL, 200, 150, 100, 50
- 'other universal buttons
- button #ConfirmItem.Yes, "Yes", [ItemConfirmed], UL, 100, 150, 100, 50
- button #ConfirmItem.No, "No", [ItemCancelled], UL, 200, 150, 100, 50
- button #ConfirmItem.MoreThanOne, "More Then 1", [MoreThenOne], UL, 150, 200, 100, 50
- button #CheckOut.ContinueShopping, "Continue Shopping", [start], UL, 100, 100, 100, 50
- button #CheckOut.CheckOut, "Check Out", [finish], UL, 150, 100, 100, 40
- 'Hot Coffe Buttons
- button #HotCoffee.Expresso, "Expresso Shots", [Expressos], UL, 100, 100, 100, 50
- button #HotCoffee.Cappuccinos, "Cappuccinos", [Cappuccinos], UL, 200, 100, 100, 50
- button #HotCoffee.Lattes, "Lattes", [Lattes], UL, 100, 150, 100, 50
- button #HotCoffee.Americanos, "Americanos", [Americanos], UL, 200, 150, 100, 50
- button #HotCoffee.Brewed_Coffees, "Brewed Coffees", [Brewed_Coffees], UL, 100, 200, 100, 50
- button #ExpressoShots.Express, "Expresso", [Expresso], UL, 100, 100, 100, 50
- button #ExpressoShots.EspressoConPanna, "Espresso Con Panna", [EspressoConPanna], UL 100, 200, 100, 50
- ItemCount = 1
- [start]
- if MenuOpen = 0 then
- open "Menu" for window as #Menu1
- MenuOpen = 1
- end if
- wait
- [HotCoffee]
- open "Hot Coffees" for window as #HotCoffee
- wait
- 'handles everything dealing with expresso shots
- [Expressos]
- open "Expressos" for window as #ExpressoShots
- wait
- [Expresso]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Expresso"
- CurrentItem = 0
- wait
- [EspressoConPanna]
- open "Confirm item" for window as #ConfirmItem
- CurrentItem$ = "Espresso Con Panna"
- CurrentItem = 1
- wait
- 'handles everything dealing with Cappuccinos
- [Cappuccinos]
- notice "Cappuccinos was pressed"
- 'handles everything with lattes
- [Lattes]
- notice "Lattes was pressed"
- 'handles everything with Americanos
- [Americanos]
- notice "Americanos was pressed"
- 'handles everything with Brewed Coffees
- [Brewed_Coffees]
- notice "Brewed Coffees was pressed"
- close #HotCoffee
- [MoreThenOne]
- prompt "Quantity" + chr$(13) + "Enter Desired Amount"; ItemCount
- [ItemConfirmed]
- if ItemCount = 1 then
- print "1 "; CurrentItem$;
- print " purchased."
- else
- print ItemCount; CurrentItem$;
- print "s purchased."
- end if
- 'increases the count of the chosen item
- if CurrentItem = 0 then ExpressoCount = ExpressoCount + ItemCount
- if CurrentItem = 1 then EspressoConPannaCount = EspressoConPannaCount + ItemCount
- ItemCount = 1
- close #ConfirmItem
- [ItemCancelled]
- open "Check Out" for window as #CheckOut
- wait
- [finish]
- close #Menu1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement