Homework set 3: List mania, or the W9C: Willie Wonka's Wonderful World Wide Widget Warehouse and Water Works Consortium.

Due Tuesday, Apr 15 (as modified: originally Apr 13 was specified).
Also, late homework submitted through Mon, Apr 19 will get only a 10% penalty.

The W9C Consortium is working on the project of expanding the UPC code system and is asking you to implement a trial system for our Warehouses. Universal Product Codes (UPC) are the familiar 12 digit codes assigned to products and usually placed on the product in bar code format. For instance the UPC code on our textbook is 780201308792. There is an industry movement to expand the UPC system so that for many kinds of products each individual item can have a unique code. For instance each can of tuna will have a code unique to that specific can. This is a serious plan currently under develpment in the real world. For instance see ePC.

In our trial, xUPC codes will consist of two parts The first is the traditional UPC product code. The second is the "UIC", stands for Universal Item Code, a unique identifier for each particular instance of the product. For each item in our warehouse with an xUPC identifier, we will store the xUPC pair and a also string giving a brief description of the item, such as "Brazilian kumquat soup, 12oz.". We will receive these items individually and accept orders for one at a time. However some items such as nails, grass seed, and buttons, will still be handled in bulk form. For these bulk items, we will store the traditional UPC product code, a quantity, and a descriptive string. A bulk item order order can be for any quantity. Customers can order any quantity of bulk items. No partial orders are filled. If the warehouse has insufficient quantity for an order, the order is put on hold until a sufficient amount of the item comes in.

Your job is to modify the World Wide Widget Works inventory example in the text to accomodate these changes. Records will also include a "timestamp" field, indicating date of receipt of the item in the warehouse. You should fill orders with goods in the order received.

In particular, your implementation should make the test program in 220/widgetworks/w9cmain.cc work correctly. You have considerable lattitude in your design, but notice that you are expected to adhere to the interface used by w9cmain.cc (rather than make any change to it). Behind the scenes you can use any classes and container types you want (but the presumption is that you will start by modifying the inventory and widget classes from the text and use lists as the primary container type. However, those inclined to do so are free to look ahead and try queues or maps or such, particularly if you think it makes the implementation easier or more efficient. It would be effective to have a parent widget class storing UPC codes and discriptive strings and two subclasses storing either UIC codes for xUPC items or quantity for bulk items. As in previous projects, You are expected to setup and use a Makefile and to have each major component in a separate file. Be certain you are using g++ version 3.2 or higher.

Submission instructions will come later.

Start Early:

  1. Glitches require time to overcome.
  2. Late penalties are high.
  3. The next project will be assigned before the due date of this one.