CSC133 Introduction to CS Using C++
Lab 9

Write a program to maintain the inventory for amazoon.com, a start up web site that sells books, CDs, and DVDs. Right now, amazoon.com only has five items available, because the warehouse is in the CEO's garage. They hope to add more items as venture capital becomes available. The five items stocked by amazoon.com are:

        item                        item code       initial inventory
    Some Devil, Dave Mattews           351               100
    War and Peace, Leo Tolstoy         904               200
    Jet Li's Fearless                  776               300
    Feels Like Home, Norah Jones       820               500
    The DaVinci Code, Dan Brown        502               250

Your program will do the following:

  1. Present a menu to the inventory clerk and read the command entered by the clerk. This menu will allow the clerk to record when items are shipped or received. It will also allow the clerk to print the inventory, and to exit the program.
  2. Process the command entered by the inventory clerk.
  3. The program will continue to present the menu and process commands until the clerk enters the command to exit the program.

The menu presented by the program should resemble the following:

Amazoon.com Inventory Control
Enter one of the following commands:
   Receive items:   r
   Ship items:      s
   Print inventory: p
   Exit program:    e
Enter command ==>

The commands should be processed as follows:

Use functions and parameters in your program. Try to make your main an outline of the program, with a function for each major part of the processing. Spend some time planning what functions you will use and what each function will do before you start writing your program. You may use global constants but do not use any global variables.


Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2002