Assigned | Mon Oct 25th, 2004 |
Design Due | Sunday Oct 31 at 11:59pm |
Program Due | Sunday Nov 7th at 11:59pm |
Updates | 28 October 2004
The requirement that the Truck use operator+= to add a DeliveryRcd is superfluous and has been removed. There's no need for any such Truck operation. |
The handling of the BOXES and TOYS command in project 3 is the same as the required implementation in project 2. Those who did the extra credit version of project 2 are required to modify their code to revert to the required method which is repeated for you here.
In this project you will be filling boxes (plural) with round tinker toys and shipping them to the assembly plant in a truck. We will make round tinker toys with various diameters and colors. We will be filling multiple boxes with varying dimensions, placing them in the truck and driving the truck to the assembly plant. Our truck is especially made for UMBC -- it has unlimited capacity and never gets full.
As in project 1 and 2, commands will be read and processed from a command file. The file will contain new commands and modified commands that you processed in project 2. As in project 2, your program will open the command file and loop until all commands found in the file have been executed. All valid commands in the file are properly formatted, but you may encounter invalid commands. See the Command File section below.
As you will see, many of the operations listed below appear to be quite similar to functions that were specified in project 2. This is not a coincidence. One of our goals is for you to see the value of writing reusable and/or easily modifiable code. This project gives you a chance to reuse and/or modify code from project 2.
The operations of each class are described below. Each operation is implemented as a single public member function of the class. It's up to you to provide complete prototypes (name, parameters (and how they are passed), return types and "constness") for each public member function. No other public member functions are allowed, but you may implement whatever private member functions you deem necessary. None of the operations listed below read the command file. All data members of all classes must be private
As an academic exercise, all data members of this class must be dynamically allocated. This will not be a requirement for project 4. The DeliveryRecord supports the following operations
DeliveryLog
A DeliveryLog is a set of DeliveryRecords kept in the order in which deliveries are made.
Each Truck keeps a DeliveryLog so it can report its delivery activity details.
The DeliveryLog supports the following operations
You must provide the makefile for this project. Use the makefile from project 2 and modify it appropriately. If you don't change the names of the files from project 2, the changes will be minimal.
The graders will be typing the command make Proj3 when they grade your project. This command must cause all .cpp files to be compiled and the executable named Proj3 to be created.
The make utility can also be used for compiling a single program without linking. For example, to compile Box.cpp, type make Box.o.
In addition to compiling and linking your files, make can be used for maintaining your directory. Typing make clean will remove any extraneous files in your directory, such as .o files and core files. Typing make cleanest will remove all .o files, core, Proj3, and backup files created by the editor. More information about these commands can be found at the bottom of the makefile.
The grade for this project will be broken down as follows. A more detailed breakdown will be provided in the grade form you receive with your project grade.
You can check to see what files you have submitted by typing
More complete documentation for submit and related commands can be found here.
Remember -- if you make any change to your program, no matter how insignificant it may seem, you should recompile and retest your program before submitting it. Even the smallest typo can cause compiler errors and a reduction in your grade.
Avoid unpleasant surprises!
Be sure to use the submitmake and submitrun utilities provided for you to compile, link and run your program after you've submitted it.