CS 162 Lecture Notes - Lecture 10: Pepperoni
CS 162 – Lecture 10 – Assignment 2 Questions
Place an order
o Set up: order off of total menu
▪ Select order has been selected
o Print menu specify how they will select pizza
o Menu:
▪ 1. Pepperoni 5 8 10 ingredients
▪ 2. Cheese 4 5 6 ingredients
▪ 3. Combo 7 10 12 ingredients
• which pizza? 2
• what size? M
• how many?
• Add another? Y
o Prompt for customer info
o Order struct
▪ Name
▪ Size
▪ Quantity
o Array order struct dynamically grow as they add pizza
o Store customer info in variables
o Write to file, generate an order number
Search_pizza_by_ingredients()
o Menu – create a temp menu
▪ Dynamically grown
▪ For each menu item
• Test include/exclude
• Add to the temp pizzas[]
▪ Return temp
o Menu refined_menu = search_pizza_by_ingredients()
find more resources at oneclass.com
find more resources at oneclass.com