©2006 Felleisen, Proulx, et. al.
2.3 Problem
The web based program that helps people find the driving directions from one place to another needs to represent the road maps. The data designer for the MapQwest company decided to make a list of all intersections (giving each intersection a name and noting its location) and a list of street segments. Each street segment has a street name, the beginning and ending intersection, the distance and the direction, that can be one of East, West, North, or South. (Of course, later we may choose to represent more directions, but for now, this should be sufficient.) Finally, a map consist of a list of intersections and a list of street segments.
Design Java classes to represent maps for the MapQwest company.
2.4 Problem
A large restaurant want to keep track of all orders to make the life simpler for the kitchen staff. The goal is to make sure the orders for each table are grouped together, billed together, and the tip is given to the appropriate server. Here is a more detailed description of the information we need to track:
There are tables in the restaurant with customers (each table has a maximum number of customers, but can have none at any given time)
There are servers (waiters and waitresses) - each is assigned to several tables (typically at least one, but could have no assigned tables when on a break)
The restaurant serves a number of menu items (at the start all are grouped together, later we may decide to divide them into categories, such as soup, salad, the main dish, desert, beverage, etc.) Each menu item has a name and a price.
The customers give their orders to the servers, who then notify the kitchen staff. Each order consists of the name of the dish, the server who took the order and the table which ordered the dish. Later we may match the order with a specific customer at the table, but for now, it is the server's job to bring the dish to the correct customer.
We may need to group the orders by the tables, by the server, or by the name of the dish - this we will leave for later.
Design the class hierarchy to represent a restaurant with tables, servers, menu items, and orders.
2.5 Writing Problem
Writing assignments are separate from the rest of the assignment for the week. You should work on this assignment alone, and submit your work individually on the due date for the rest of the homework. The answer should be about two paragraphs long -- not to exceed half a page or 300 words.
A tremendous amount of effort goes into the design of computer games. Look up some information about game design and its impact on the field of computing. Write a short paragraph that explains whether you find this to be a worthwhile effort and why do you feel that way. Support your argument with concrete examples - just saying that you think it is a big waste or that it is a great stuff is not enough. Solution