CS180 Spring 2011

Project 4: CS180 Burgers 'R Us Revisited

Assigned : Tue March 22nd, 2011

Due : 11:59pm Fri April 1st, 2011

1. Objectives

In this project, you would learn how to:

You should be familiar with the material from the lectures, recitations, and book readings up to this point. Note that this project is closely related to Project 3, so it is as considerably large in scope as Project 3. You should start as early as possible and ask questions when they arise.

2. Setup

3. Project Description

In Project 3, you have developed a program which simulates the process of placing orders and cooking orders at CS180 Burgers 'R Us restaurant. However, after using the program a while, the owner of the restaurant wants you to modify the program to meet his additional demands described in the following:

4. Steps to Solve the Problem

In this section, we will help you to develop your code incrementally and make use of the classes and methods we have provided to build your program.

Step 0: The big picture

Imagine that the program you are going to implement composes of three main components: BurgerJoint, OrderManager and Kitchen. Now, suppose that you want to order your lunch from CS180 Burgers 'R Us. The following procedure will be processed in order to serve your order:

Step 1: Implement Generic LinkedList

As you can see in Step 0, the restaurant wants to maintain two lists, one list for orders, the other list for chefs. To do so, you are asked to implement a generic linked-list so that it can be re-use in both cases. To help you on doing this step, we have provided a generic interface called ILinkedList. What you have to do is described in the following:

Step 2: Extend Order class

Since the restaurant has extended its service by offering three different types of orders with different purposes, you are asked to extend the class Order with the following classes:

Step 3: Implement OrderManager class

OrderManager is sure one of the main component of this program. You are asked to create a class called OrderManager which extends the abstract class OrderList. You can look at the API of OrderList for more details, however, we want to emphasize the following points:

Step 4: Implement Kitchen class

In the step, you are asked to create a class called Kitchen to implement the interface IKitchen. You can look at the API of IKitchen for more details, however, we want to emphasize the following points:

Step 5: Error Handling

Be careful when you handle errors, especially the following errors:

5. Puting all together

You have been given the skeleton code Project4.java which plays as your main program. You don't have to change anything in this file. Once you implement the above steps correctly, you should be able to see the following GUI:

The following GUI displays some orders have been placed and some chefs have been added.

When you click on the "Cook Order" button, you can see the following GUI:

Click on the "Cook Order" button one more time, you can see the following GUI:

5. Grading rubric

Criteria

Points

Coding Standards (see here)

5

Program Compile

5

LinkedList class

30

Extend Order class

15

OrderManager class

20

Kitchen class

20

Error Handling

5

Total

100

6. Turn in instructions

*XXX is your recitation section number. Check it here if you do not remember.