Features to be
implemented |
|
- Declare a new type 'RoomPointer'
that is a pointer to a RoomNode (analogous to 'NodePointer'
from my notes on linked lists): 1 mark
|
|
- Declare a new type 'RoomNode'
(analogous to 'Node' from my
notes on linked lists) which is a record with two fields: a) 'Data'
which is of type 'Room' as
declared in the previous assignment b) 'Next' which is a RoomPointer: 1 mark
|
|
- Declares a head pointer of type 'RoomPointer': 1 mark
|
|
- Displays instructions on how to use the program each time that
it is run: 1 mark
|
|
- Display a signoff message to indicate to the user that he or she
has quit the program: 1 mark
|
|
- Some form of debug mode has been implemented: 1 mark
|
|
- Displays a menu showing the list management functions: 1 mark
|
|
- (Q)uit: The user can quit the program: 1 mark
|
|
- (D)isplay: The program display the list in a fashion that
is similar to the previous assignment: 2
marks
|
|
- (L)oad: This feature can be implemented in one of the two
ways that was described in the previous assignment: 4 marks
maximum for this feature
|
|
|
- As the information for each room is read in from file it's added
to the end of the list: 2 marks
|
|
|
- As the information for each room is read in from file it's
inserted in correct alphabetical order according to the room code
(no shifting of elements should be necessary): 4
marks
|
|
- Correctly handle the case of an empty input file. This feature
is identical to the previous assignment: 1 mark
|
|
- (S)ave: This feature is identical to the previous
assignment : 3 marks
|
|
- (F)ind: This feature is identical to the
previous assignment:
3 marks
|
|
- (P)resent: This feature is identical to the previous
assignment: 3 marks
|
|
- (A)dd: This feature is identical to the previous
assignment except that there should no longer be any need to shift
elements. You can
implement this feature in one of two possible ways: 4 marks
maximum for this feature
|
|
|
- New rooms will be added to the end of the list: 2 marks
|
|
|
- New rooms will be inserted in it's correct alphabetical order
according to the room code (no shifting of elements should be
necessary): 4 marks
|
|
- (R)emove: This feature is identical to the previous
assignment except there should be no need to shift list elements : 4
marks
|
|
- (O)rder reverse display:
In order to receive credit for
this feature you cannot use doubly linked lists (which has pointers
to the previous and successor nodes - 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 by invoking this feature. 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).
|