Introduction to Computer Science I by James Tam | Return to the course web page |
Unless otherwise specified, the requirements for this assignment are identical to the ones described in the previous assignment.
Your program reads the information from the input file 'courses.dat' into a linked list (rather than a fixed size array as you did with the previous assignment). This means that your program should not have an arbitrary limit on the size of the list. In all other respects this of this assignment should include all the features of the "C+ version" of the previous assignment (display, load, save and quit).
Missing the features of the base assignment: You have the potential to receive a maximum grade of 'C+' if you implement all of the above features. If features are missed or improperly implemented then your mark may be reduced by a letter step for each feature that is missed (down to a minimum grade of a 'D' assuming of course that it actually compiles):
Completion of each of these extra features (save for feature four which is worth two letter steps) will result in the increase of a "one step" to your grade e.g., 'C+' to 'B-'. Unless there is a compelling reason to do otherwise you may complete as many of the features below as you wish in whatever combination that you desire. Successful completion of all six features will make you eligible for an 'A++' (GPA = 4.6!). (You must also fulfill style requirements as well as the general submission assignment requirements
Feature one (Display the list in Opposite order - this first feature replaces the sorting feature from the previous assignment)
In order to receive credit for this feature you cannot use doubly linked lists (don't worry if you don't know what I am referring to because this topic will covered in a later course: CPSC 331) but instead you must use a recursive function or procedure call to display the list in reverse order. That is, the last element is displayed first, the second last element is displayed second until the first element is reached and it is displayed last. Because this features is a 'bonus' (actually a bonus on top of a bonus) you may have to do some extra reading to in order to sufficiently understand recursion to implement it for this assignment. Consequently I recommend that you work on this feature last, after you've gotten all the other features working because it will likely take up substantially more time than everything else. (JT: Hint completing this feature depends upon your ability think and trace code in a backwards fashion).
Feature two (Find additional details about a course):
This feature is identical to feature two in Assignment 8.
Feature three (Present all courses that meet a certain criteria):
This feature is identical to feature three in Assignment 8.
Feature four (Insert a new course):
In a similar fashion to feature four in Assignment 8, your program will perform an in-order insert of a new course into the list except that there isn't a maximum size for the list and there shouldn't be any need to shift elements. Again your program must check for duplicates and the validity of the grade point. (JT: This a fairly challenging feature because your program has to handle a fair number of conditions so you might want to wait until the end near before trying to complete it).
Feature five (Remove a course from the list):
This feature is similar to feature five from Assignment 8 except that there shouldn't be any need to shift elements.
Feature six (Write an enhanced Save feature)
This feature is identical to feature six in Assignment 8.
Note: The user should not be able to invoke features one, two, three, five and six when the list is empty. If the operation is invoked then an error message should be displayed.
You can run a sample executable called 'courses' which can be found in the UNIX directory: /home/231/assignments/assignment9. In addition there is a data file that your TA's will use when they are marking your program called 'courses.dat'.
1 What does and doesn't constitute a sufficient amount of time and effort? It's a judgment call on the part of your marker. More often than not if you put in a reasonable amount of effort into your assignment and for some reason you just couldn't get it to work then you will receive some credit for your work. An example of when you wouldn't receive credit is when you simply handed someone else's work. This latter case assumes that you properly cited the other person's work, if you didn't cite your source and tried to claim that it was your own work then it would be an example of academic misconduct (cheating).