CPSC 231:
ASSIGNMENT 8 (Due Friday June 25: Worth 6%)
New Concepts to be applied for the assignment
-
Dynamic (linked) lists
Assignment description (More cars! More cars! More cars!)
Unless otherwise specified the
description for this assignment is the same as the one for the previous
assignment.
Grading: Working submissions
Make sure you clearly indicate in your README file which
grade level that you think you have completed for this assignment. This
should be followed by a list of the features that you have implemented in your
program. As was the case with the previous assignment, failure to provide
this information will result in a grade reduction of one letter step e.g.,
"A" to "A-".
e.g., Assignment for James Tam
"B+" level assignment
Features completed:
1) All the requirements of a
"C+" level assignment
2) The ability to display all cars of particular category
3)
The ability to add a car to
the list
4)
The ability to delete an existing car from the list
Basic Assignment Submission: C+ level assignment:
Your program reads the information from a
file into the linked list and you display the contents of that list
onscreen with write's and writeln statements. The
output must be displayed in a neat and legible format file (run the executable
program for an example of formatted output).
Also, your program must be able to write the list back to an output file called
"modifiedCarData". In addition, the assignment must be properly
documented and must follow a good programming standard in order to qualify for a
"C+" grade. Similar to the previous assignment, your program has menu
driven interface. The basic program should display a menu similar to the
one shown below:
Menu options for your car collection
(d)isplay collection
(l)oad a collection from disk
(s)ave a collection to disk
(q)uit program
You should add additional menu options as you implement the extra features
that are listed below.
Extra features
Completion of each of these extra features will result in the increase of a
"one step" increase in your grade e.g., "C+" to "B-". Except for
features one, three and five you
can complete as many of the features below as you wish in whatever combination
that you desire. In the case of those three features you must
have completed feature one before you can get credit for feature three or five.
Successful completion of all six features will make you eligible for an A+ (other
assignment requirements must have been fulfilled as well).
Feature one (Find additional details about a car):
The user of the program can type in the model to
find additional information about that car . If the car is not in the list,
then your program should indicate that the car could not be found under that
name. If the car is in the list, then your program will display additional
details about that car (all six fields of that car will be displayed onscreen).
Feature two (Present all cars within a category):
This feature allows the user of the program
to display onscreen only the cars that belong to a specific category (sports
car, truck, jeep or luxury car). Cars will be presented in the order in
which they currently appear in the array.
Feature three (Edit car information - requires that you have already
completed feature one):
This feature allows the user to change
information for a particular car in the list. In order to complete the
requirements for this feature you must have completed feature one because the user of the program must indicate which car model that
they wish to edit. When the edit
feature is selected, the user of the program will then be able to edit all the
fields of a car one field at a time. You are not required to allow
the user edit only some of the fields (although you can do this if you wish).
Feature four (Insert car at the end of the list):
When this feature is selected by the user, he or she will prompted to enter
in information for all the fields of the new car.
Feature five (Remove car from the list - requires that you have
already completed feature number
one):
With this feature the user types in a model
name and if that model of car exists the program will remove it from the
collection. If the car doesn't exist in the collection the program should
indicate that the model could not be deleted because it isn't in the collection.
Feature six (Clear the entire list)
This feature allows the user to remove all
elements from the list and start again from scratch.
Grading: Non-Working submissions
D- version (0.7 GPA for the assignment))
The student has invested a considerable effort in the assignment, but the
program does not compile.
D version (1.0 GPA for the assignment)
The student has invested a considerable effort in the assignment, the program
compiles but does it not fulfill any of the requirements listed in the
assignment specification.
Other submission requirements
-
Good coding style and documentation:
They will play a role in determining your final
grade for this assignment. Your grade can be reduced by a letter step
or more if your submission was implemented using bad style conventions (e.g., "A" to "A-"
for employing poor naming
conventions for identifiers, insufficient documentation, the use of global
variables or non-modular design or excessive redundancies).
-
Include a README file in your submission: For this assignment
your README file must indicate what grade level you think your assignment should
receive (e.g., A, B or C) and the features that you have implemented.
This will allow your marker to quickly determine what he or she must look for
and speed up the marking process.
-
Assignments (source code and the README file) must be electronically
submitted via submit.
In addition a paper print out of the source code and README must be handed into the
assignment drop box for the lab that you are registered in (located on the
second floor of the Math Sciences building). Electronically submitting the
assignment allows your marker to run the code in order to quickly determine what
features were implemented. Providing a paper printout makes it easier for
your marker to read and flip through your source code. You do not
need to demo this assignment.
Suggested Approaches to this Assignment:
-
Start early! As was the case with the
previous assignment, this is another
"tough" assignment. Although there is not a lot of new concepts that you have
to understand and apply for this one, pointers and linked lists are some of
the toughest concepts that you will be facing this semester.
-
Take it in small steps. Get the basic
program working before you start working on the additional features. Make
sure it really works by testing it!
-
Back up your work! Once you get your basic
program working make a backup copy (e.g., at Unix type 'cp cars.p car.June9'. As you complete additional features backup these versions
and don't touch the backup and when you start working on more features, modify
only the copy.
-
Do attempt this assignment. Although it
isn't worth a large percentage of your final grade, writing these programs
really helps you to truly understand the concepts that you were taught in
lecture.
-
Addendum to point 4 - while it is important to try this assignment both
for the learning and the marks don't fall into the other extreme and spend all
your time on these last two assignments worth 12% and no time studying for a
final exam worth 40%.