Lecture notes for the Introduction to Computer Science I by James Tam Return to the course web page

CPSC 231: Assignment 9 (Worth 5%)

Grading Scales

Ranges Letter
Over 24 A++
23 - 24 A+
21 - 22 A
19 - 20 A-
17 - 18 B+
15 - 16 B
13 - 14 B-
11 - 12 C+
9   - 10 C
6   - 8 C-
3   - 5 D+
2 D
1 D-
0 F

 

New concepts to be applied for this assignment

 

Assignment description

Unless otherwise specified, the requirements for this assignment are identical to the ones described in the previous assignment

 

Grading

(Bare bones) basic assignment (worth 10 marks)

Your program reads the information from the input file 'movies.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.  Also the initialization of the list is different for this assignment.  In this case you just need to set the 'head' pointer to 'NIL'  In all other respects this of this assignment should include all the features of the "bare bones" base version" of the previous assignment (display, load, save and quit etc.).

Extra features:

Once you complete all the features of the basic assignment you can complete the extra features for additional credit (make sure you backup your work first and don't touch the working back up, modify a copy instead!)   Unless there are technical considerations you can complete these extra features in whatever order or combination that you desire. 

Feature one (Find additional details about a movie): 2 marks

This feature is identical to the corresponding feature from Assignment 8.

Feature two (Present genre): 2 marks

This feature is identical to the corresponding feature from Assignment 8.

Feature three (Add a movie to the collection): worth a maximum of 4 marks

In a similar fashion to feature four in Assignment 8, your program will perform an in-order insert of a new element into the list except that there isn't a maximum size for the list and there shouldn't be any need to shift elements.  (JT: This a fairly challenging feature because your program has to handle a fair number of conditions so you might want to wait until near the end before trying to complete it).

Feature four (Remove a movie from the list): 4 marks

This feature is identical to the corresponding feature from Assignment 8 except that there should be no need to shift elements.

Feature five (Write an enhanced Save feature): 2 marks

This feature is identical to the corresponding feature from Assignment 8.

           Feature six (Display the list in reverse order): 2 marks

In order to receive credit for this feature you cannot use doubly linked lists (which have a pointer to the previous node in addition to having a pointer to successor node - don't worry if you don't know what I am referring to because this topic will covered in a later course: CPSC 331).  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.  Note: The list should only be displayed in reverse order, the list should not actually be resorted into reverse order.  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).

 

Submission requirements

In addition to having fulfill the generic assignment requirements, the requirements specific to this assignment include:

  1. Include a README file in your submission:  For this assignment your README file must include your contact information: your name, university identification number and UNIX login name so that your marker knows whose assignment that he or she is marking.   For this assignment you should also list the features that you implemented.

  2. Assignments (source code/'dot-p' file and the README file) must be electronically submitted.  In addition a paper print out of the source code and README must be handed into the assignment drop box (located on the second floor of the Math Sciences building) for the tutorial that you are registered in.  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.  Unless you are told otherwise you are to email your source code and readme file to your TA and to me.  Make sure that include the following information in the subject line: "CPSC 231 Assignment X" where 'X' stands for the assignment number that you are submitting e.g., "CPSC 231 Assignment 3".

  3. As a reminder, you are not allowed to work in groups for this class.   Copying the work of another student will be regarded as academic misconduct (cheating).  For additional details about what is and is not okay for this class please refer to the following link.

To help make sure that you haven't missed anything here is a checklist of items to be used in marking.  A sample executable 'movies' can be found in UNIX under the directory: /home/231/tamj/assignments/assignment9.