Assigned | Monday Feb 23, 2004 |
Design Due | Sunday Feb 29th at 11:59pm |
Program Due | Sunday March 7th at 11:59pm |
Updates | Feb 29th - The order of data input when LOADing a cargo container
was different in the description and the sample output. The description is correct
and the sample output has been modified.
Feb 26th - when the plane crashes only the fuel is affected and should be reported as zero. The current city and values for the hours and mileage should be reported as if the fatal flight had not taken place. Feb 24th - the order of the first two command line arguments was incorrect. The volume is the first argument and the weight is the 2nd argument as now listed in the project description |
Your program will provide the user with a set of commands that control the plane. The user will be able to fly the plane, load cargo, unload cargo and print the current status of the plane. An acceptable format for the output is found in the sample output section below.
Project 2 will be executed from the command line with 5 parameters in the order listed below. All numeric arguments must be positive.
As in project 1, the function prototypes specify the parameter types and return types, but not the method of passing the parameters or returning the values. These are left to you, but you must use the "best" method for each data type and purpose as discussed in class.
The "make" utility is used to help control projects with large numbers of files. It consists of targets, rules, and dependencies. You will be learning about make files in discussion. For this project, examine and understand the makefile for project 1, then modify it for project 2.
When you want to compile and link your program, simply type the command make or make Proj2 at the Linux prompt. This will compile Proj2.cpp, CargoPlane.cpp and Cargo.cpp and create the executable named Proj2. Your executable MUST be named Proj2 as that name is used in the testing/grading scripts.
The make utility can also be used for compiling a single program without linking. For example, to compile Cargo.cpp, type make Cargo.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, Proj1, 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.