Exercise: a pizza shop

Note:This exercise might be started now and finished after you have covered subclasses, or simply delayed until after that topic.

You are designing a database for a pizza shop that wants to get into Web-based sales. Your client has given you the transcript of a typical phone order conversation:

Pizza shop associate (Lori): “Thank you for calling the Pizza Shop; this is Lori. How may I help you?”

Caller (Rick): “What toppings do you put on your all-meat special?”

Lori: “Italian sausage, pepperoni, ground beef, salami, and bacon.”

Rick: “OK, I’d like a large one, but without the bacon.”

Lori: “Do you want regular crust, extra-thin, or whole wheat?”

Rick: “Regular is fine. And a medium wheat crust with just cheese.”

Lori: “We have mozzarella, parmesan, romano, smoked cheddar, and jalapeño jack.”

Rick: “Uhhh…just mozzarella and romano. What kind of sauce is on that?”

Lori: “Marinara, spicy southwestern, tandoori masala, or pesto—your choice.”

Rick: “Pesto sounds good.”

Lori: “You can add a large order of breadsticks for just 99 cents.”

Rick: “Sure, why not? And I'd like three small salads…” (muffled) “…make two of’em with Italian dressing and one with ranch.”

Lori: “The dressing comes on the side; we’ll give you an extra one of each flavor. What would you like to drink?”

Rick: “Keg’a beer, maybe?”

Lori: “Sorry, we just have soft drinks.”

Rick: (laughs) “Just kidding—how about two medium diet colas and a large iced tea.”

Lori: “That’s one large regular crust all-meat special, no bacon, one medium wheat crust with pesto sauce, mozzarella and romano, one large order of breadsticks, three small salads, three Italian dressing, two ranch, two medium diet colas and one large iced tea. Just a minute, please…(cash register clicks several times)…your total with tax is 27 dollars and 39 cents. Is this for pickup or delivery?”

Rick: “I’ll pick it up.”

Lori: “And your name?”

Rick: “Rick.”

Lori: “Thank you for your order, Rick. It’ll be ready in about 20 minutes.”

Rick: “See’ya then.”

• Develop a class diagram which will accommodate at least the information contained in this conversation, then draw the relation scheme. Remember to describe each class, and the associations between them, in English. Your system will have to let the sales associate (or Web customer) select from the available current menu choices, and also let the sales associate (or Web script) record the order.