“Yes, you said if I wanted to use this program to serve many customers, I’d have to repeat the menus for each customer—ask their name and what they want to order.”
“A loop, maybe? Like we did with menus. Repeat until the customer types the right numbers or types x.”
“You’re absolutely right!” Simon was really glad that his brother caught on to this programming idea so quickly. “We’ll ask the customer their name, like in our first program. Then we’ll get their order with all the flavors and toppings.”
“Yes,” Erik continued, “and then we’ll give them the choice to order or cancel? I saw that on some websites.”
“Right. When they click Order, we save the order and print it for the barista. If they cancel, we just forget about it. In both cases, we go back to the beginning of the main menu and ask the next customer their name.”