Assigned | Monday April 26, 2004 |
Design Due | Sunday May 2, 2004 at 11:59pm |
Program Due | Sunday May 9, 2004 at 11:59pm |
Updates | 30 April
The first statement under the summary of restrictions was missing the word "NO". The original statement was In particular, there are weight or volume restrictions when loading "things" and "things" do not automatically unload when the transport lands. This statement has been edit to be In particular, there are NO weight or volume restrictions when loading "things" and "things" do not automatically unload when the transport lands. 29 April
28 April
|
As in project 4, you will be reading commands from a file and directing your Transport plane. Output will once again be written to a logfile.
You will also be designing and using your own exception classes. The conditions under which an exception is thrown are listed in the details below.
Project 5 is invoked with the following command line arguments in the order listed
The Cargo class interface is defined by these public functions:
Implement an exception class named BadCmdLine that contains a different message for each potential problem with the command line. Each message must inform the user of the proper command line format. These exceptions are thrown by GetCmdLine() and caught in main( ). Each of these errors is fatal, so your program should terminate. Potential problems are
Implement an exception class for Transport errors. The following exceptions will be thrown by some Transport member function and caught by ProcessCommands( ). None of these are fatal errors, so your program should continue processing the command file after handling each exception.
Note that this function is overloaded and is NOT a function template.
One version of ProcessCommands( ) reads and interprets
the commands for a cargo transport, the other reads and interprets commands for a commuter transport.
For each command read, the appropriate Transport function is called. This function catches any
exceptions thrown by the Transport.
The format for LOAD and UNLOAD is different for each type of Transport, but is the same
as project 4.
It is not necessary that you follow their format exactly,
but whatever format you choose must provide all required information,
including tabular form for the cargo data.
The Command File
For this project, the orders for each aircraft will be read from a file
as in project 4. Orders are processed by the ProcessCommands( ) function.
As in project 4, each command and each data item will be on a separate
line in the file. The format of the PRINT, LAND, TAKEOFF, CLIMB, DESCEND and QUIT commands
are identical for all aircraft. Sample command files are available in Mr. Frey's
public directory.
Summary of Miscellaneous Project Requirements, Restrictions and Assumptions
Most of these are the same as project 4. New or substantially modified items are indicated with
Sample Output
The sample output is found in the logfiles in Mr. Frey's public directory.
The command files and scripts which produced the sample output are also available.
For example, the script p5Cargo1 reads commands from p5Cargo1.cmds
and logs output to p5Cargo1.log. After copying the files to your local
directory, type the name of the script.
You may assume the Cargo dimensions are no more than 3 digits each
You may assume the volume is no more than 12 digits
You may assume the weight is no more than 12 digits (including 2 decimals)
You may assume that the city names are no more than 20 characters
Free Advice and Information
Project Design Assignment
Your project design document for project 5 must be named p5design.txt.
Be sure to read the design specification carefully.
Submit your design in the usual way: submit cs202 Proj5 p5design.txt
As this is a significant number of extra credit points, you are required to implement this feature with little or no help from the TAs, help center, instructors or Blackboard.
As part of your descriptive message, the following details are to be provided
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 4, then modify it for project 5.
When you want to compile and link your program, simply type the command make or make Proj5 at the Linux prompt. This should compile all relevent source files and create your executable. executable named Proj5. Your executable MUST be named Proj5 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.
The order in which the files are submitted doesn't matter. However, you must make sure that all files necessary to compile your project (using the makefile) are listed. You need not submit all files at the same time. You may resubmit your files as often as you like, but only the last submittal will be graded and will be used to determine if your project is late. For more information, see the projects page on the course website.
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.