Project 4 : Order Management for a Short-order Cook


Due : 4pm, 11 August
This is an optional extra-credit assignment. If you do this, you must hand it in to the instructor by the due-date, and do a demonstration in the 4pm-5pm timeslot (which may be extended, depending on the number of people who attempt this project) on Friday 11 August.

There will be NO extensions and NO late submissions accepted.

Your grade for this project will replace your lowest project grade (if you score higher on this project than at least one other project).

Note: There are many parts to this project. You will be graded on how many you have done and if they work. The standard grading scheme still applies, so remember efficiency, documentation, output, and creativity.


In a small roadside restaurant, there is stereotypically a single waiter (or waitress) and a single cook. The waiter takes your order and passes it on to the cook. This communication is usually managed by a circular carousel on which orders are placed and removed. Orders are placed at one point by the waiter and removed at another point by the cook.

Implement an electronic order management system that mimics this device. Each order must correspond to a single string with no spaces (for example, "ScrambledEggs" or "PlainToast"). The list of orders is to be stored in a Circular Doubly Linked List, with two pointers: a Waiter and a Cook. Expand upon the following class declarations for the list and node and use them in your program:

class OrderClass 
{
   string Order;
   OrderClass *Next, *Prev;
   ...
};

class OrderListClass
{
   OrderClass *Waiter, *Cook;
public:
   OrderClass ();
   ~OrderClass ();
   ...
};

Include functions in your linked list to perform the following operations:

  1. Insert a new order at the Waiter pointer.
  2. Display an order at the Waiter pointer.
  3. Change an order at the Waiter pointer.
  4. Remove an order at the Waiter pointer.
  5. Display an order at the Cook pointer.
  6. Remove an order from the Cook pointer.
  7. Move the Cook pointer one position clockwise.
  8. Move the Cook pointer one position counter-clockwise.
  9. Display all elements starting at the Cook pointer.
  10. Display all elements starting at the Waiter pointer.

Implement an interactive user interface (using either a text-mode console or Amulet) to manipulate this linked list. Give the user options to perform operations that correspond to each function of the linked list (as listed above) with appropriate input/output for each case.

Remember, also, to include a constructor and destructor for each class, and use accessor/mutator functions to access private variables.

Submission


Last updated : 8 August 2000 11.53am