One of your (hipster) acquaintances thinks he has the next billion-dollar startup idea for an app: Pizza Delivery with Entertainment. He heard from other people that you are following the course on database management, and asks you to design the UML class diagram. Afterwards, he will use the UML class diagram to ask programmers to implement the app.
He explains the basic functionality of the app as follows: customers can order pizzas from restaurants to be delivered to a specific address, and if they want to, they can choose a special “entertainment order”. When an order is an entertainment order, the delivery person stays with the customer after delivering the pizza and entertains the customers (e.g., by singing, making jokes, doing magic tricks, etc.) for a certain amount of time.
New follows a detailed explanation of the range of capabilities of the app: when people create an account for the app and become app users, they have to indicate their birthday and fill in their name and address. Every user should also be uniquely identifiable.
Once the account is created, the users should be presented with three options: the first option in the app is to select “business owner”. Of these business owners, we also ask them to provide their LinkedIn account so we can add them to our profession network. Every business owner can own a number of pizza restaurants. Of these pizza restaurants, we want to register the zip code, address, phone number, website, and the opening hours.
Each pizza restaurant can offer a number of pizzas. Of those pizzas, we want to keep the name (margarita, quattro stagioni, etc.), the crust structure (for example, classic Italian crust, deep dish crust, cheese crust), and the price. While two pizzas from different pizza restaurants may have the same name, they will not be exactly the same as the taste will be different, and thus should be considered unique. Moreover, pizzas should be distinguishable even if they have the same price, e.g., a pizza margarita from Pizza Pronto in New York which costs $12 must be distinguishable from a pizza margarita from Pizza Rapido in Singapore, which also costs $12.
The second option in the app is to select “hungry customer”. For these hungry customers, we need a delivery address. Hungry customers can make orders for pizzas. Each order gets assigned an ID, and we want our app to log the date and time when the order was placed. We also allow the hungry customer to indicate the latest time of delivery, and ask how many people the order is for. An order can be for one or more pizzas.
Also, a special type of order can be made: the entertainment order. Not every order has to be an entertainment order. But when a hungry customer indicates that he or she wants to be entertained while eating the pizza, we not only want to register all the regular order information, but also the type of entertainment the user requests, and for how long (a duration).
The third option in the app to select is that of “entertainer”. When users select entertainer, they need to provide a stage name, write a short bio about themselves, and indicate their price per 30 minutes. Every entertainment order is fulfilled by exactly one entertainer. Every entertainer can choose for which pizza restaurant(s) he/she wants to work. For each pizza restaurant an entertainer wants to work with, he/she should indicate his/her availability by day (Monday, Tuesday, Wednesday, etc.).