For each of the following word problems, extract structure definitions for the data involved. (Do not design a whole program to solve the problem!)
Exercise 1: A restaurant reservation system keeps track of tables in the restaurant. For each table, the system knows how many seats there are and whether or not it is currently reserved. Develop a program that consumes a table and reserves it for the night.
Exercise 2: Each dish served by the restaurant must be served within a particular temperature range. A dish has a name, a price, a minimum serving temperature, and a maximum serving temperature (in degrees Fahrenheit). Design a program that consumes a dish and its temperature and determines if the dish can be served.
Exercise 3: A food order consists of an appetizer, an entree, and a dessert. Each course is a dish as described in Exercise 2. Develop a program that determines the total cost of a given order, including an 18% gratuity.
Exercise 4: The restaurant is divided into a bar area, three sections of tables, and the entry area. The bar is staffed by one bartender, and the entry area is staffed by the maitre d'. Each section is tended by two servers. Design a program that consumes a restaurant and an employee's name, and determines the name of the area in which the given employee is working.
Now, complete Exercises 1, 3, and 4.
Our restaurant needs a steady throughput of customers, but, sometimes, a party stays at their table too long after finishing their meal. Then the maitre d' has to give them the "evil eye" to encourage them to be on their way. Develop a program that consumes the party's reservation and the current time and determines how much longer before the maitre d' should take action. Parties usually finish dinner in one hour, and on weekdays they may remain for 30 minutes more. On weekends, they may only linger for 15 minutes.