| 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 'books.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 the "C+ version" of this assignment should include all the features of the "C version" of the previous assignment (display, load, save and quit).
Completion of each of these extra features 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+'. (You must also fulfill style requirements as well as the general submission assignment requirements).
Feature one (Find additional details about a book):
The user of the program can type in the title (case sensitive) in order to find additional information about that book. If the book is not in the list, then your program should indicate that no book could not be found under that title. If the book is in the list, then your program will display additional details about that book (all the fields will be displayed onscreen).
Feature two (Present all books of a certain genre):
This feature allows the user of the program to display the titles of all of the books of a particular genre (alternatively you can get your program to show all titles that were written by a particular author or with a specific rating but since these operations are very similar you will only get a maximum credit of one grade step for this feature regardless of how many criteria that your program can use as presentation criteria).
If you have already completed feature one, then the books will be presented in alphabetical order, otherwise they will presented in the order in which they currently appear in the list.
Feature three (Insert a book 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 book which will then be added to the end of the list.
Feature four (Remove a book from the list):
Since the user must type in the name of the book in order to indicate which book that he or she wishes to remove from the list you will likely have already completed the 'find' feature first (feature one). When the collection is displayed after the removal, no information about the book that was removed should be displayed - not even blank spaces.
Feature five (Write an enhanced Save feature)
In order to get credit for this feature, the program will now use only one data file. The program will load the site information from the 'books.dat' file. When the user of the program selects the 'save' option then the program can write the modifications to the 'books.dat' file rather than a separate file. To get credit for this feature your program must be able to reload the updated information from the modified file. This latter requirement means that your program must write the information to disk in the exact same format that it was originally stored. If there any differences from the original data file and the modified version your program will not be able to properly read it back into the list.
Feature six (Display the list in Opposite order)
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) 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 which is displayed last. Because this features is a 'bonus' you may have to do some extra reading to in order to sufficiently understand recursion to implement it in 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 it depends upon if you can think and trace code in a somewhat backwards fashion).
D level assignment
The student has invested considerable work in the assignment and the code compiles but it doesn't fulfill any of the above requirements.
D- level assignment
The student has invested considerable work in the assignment but it doesn't compile.