1. Movie name
This field consists of an alpha (and sometime numeric string e.g.,
Star Trek 2 as an alternative to
Star Trek II).
2. Cast
The cast list will consist of the full names of three of the actors from
this film. A 1D array of strings can be used to store the cast
information e.g.,
[0] |
H |
e |
a |
t |
h |
e |
r |
|
M |
o |
r |
r |
i |
s |
|
|
[1] |
R |
i |
c |
h |
a |
r |
d |
|
G |
r |
o |
s |
s |
e |
|
|
[2] |
D |
o |
n |
n |
a |
|
B |
u |
r |
k |
e |
|
|
|
|
|
3. Genre
The genre field describes the category that the movie falls into. There
will be six different categories of movies: action, drama, science fiction,
comedy, horror, martial arts or 'other'. You don't have worry about checking
for instances where a movie falls into multiple genres.
4. Rating
This field uses a number of stars to rate each movie according to its
entertainment value1. The greater the number of stars, the better
the movie:
1 star (It sucks): It's not the type of movie that's so bad that
it's good, it's just all bad. Don't
waste your time with this one.
2 stars (Poor): Overall there were more things that I disliked
than liked with this movie.
Unless there's a ticket sale it's probably one that you should avoid.
3 stars (Average): There were some things that I liked and some
things that I disliked. It's one
that you may want to rent/stream rather than buy.
4 stars (Good): This movie has some flaws but overall you'll
have a great time watching it.
5 stars (A true masterpiece!): I laughed, I cried, it became a
part of me. It should definitely
be nominated for an Oscar (maybe several).
When movies are displayed each field will
reside on a separate line and each movie will be separated by a line of stars
(but the stars are not an attribute of a movie object).
TERMINATOR 2
JUDGMENT DAY
Arnold Schwarzenegger
Linda Hamilton
Edward Furlong
Action
5
************
IT'S A WONDERFUL LIFE
James Stewart
Donna Reed
Lionel Barrymore
Drama
5
************
ROMEO AND JULIET
Leonard Whiting
Olivia Hussey
John McEnery
Drama
5
************
1. |
JT: The number of stars
given to the movies in the input file was based solely upon my opinion and
does not necessarily reflect the opinions of the university so please
don't write angry letters outrage because you thought I didn't properly
rate your favourite flick ☺. |
|
- Displays an introduction to the program that describes how it works
each time that it's run.
|
|
- Displays a sign off exit message to indicate to the user that the
program has ended.
|
|
- Defines class 'Movie'
that with the 4 attributes described above.
|
|
- Defines class 'MovieNode'
(analogous to 'BookNode' from my notes
on linked lists) which is a class with two fields: a) 'Data'
which is of type 'Movie' b) 'Next'
which is a reference to a MovieNode
(next node in the list or null for the end of the list).
|
|
- Declares a head reference/pointer of type 'MovieNode'
which is initialized to null. To get credit for this feature you just need
to outline the attributes and (empty) methods. You will get credit for
implementing the methods in features 11 - 15 below).
|
|
- Defines a 'manager' class which will include methods for all the list
operations e.g., add, remove, search, display. Your first step is to
define this class with just the method signatures and empty methods. Later
you can fill in the method bodies (feature #10, 13, 14, 15).
|
|
- Implements some form of debug mode (i.e., it has a debugging variable
that will display some sort of debugging message when the program is in
debug mode). The particulars of your messages are left to your discretion,
the main idea is that these messages provide information to help you find
and fix the errors in your program and only appear when the program is in
the debugging state.
|
|
- Displays a menu listing the features available. (The menu options
don't have to be functional yet, to get credit for this the feature the
menu just has to be displayed).
|
|
- The program repeats until the user quits. Each time that the program
repeats the main menu (above) is displayed. The (Q)uit menu option
has been implemented.
|
|
- (A)dd a movie to the collection: You are to implement one of
two versions of the add feature. (You only get credit for one feature or
the other). In both cases the program will prompt the user to enter each
field one-at-a-time. Although the program doesn't have to check for
duplicate movies it should error check the genre and the rating when new
movies are added. (See the next two features). The add feature must be
implemented before you can get credit for any of the other features that
follow it.
|
|
|
- The simple version will add new movies to the end of the list.
|
|
|
- The advanced version will insert movies in ascending order of name.
(You can use the String method 'compareToIgnoreCase'
to determine ordering)
|
|
- (When add feature is invoked): The genre should only be one of the
types listed above. If not the program should continue prompting the user
for a valid value until either a valid one is entered or the person
signals that they wish to cancel adding a new movie (by just hitting enter
- blank genre - during the error handling loop).
|
|
- (When the add feature is invoked): The program should check that the
rating is a value between one and five. If not then the program should
continue prompting the person for the number of start until either a
legitimate value is entered or the person enters a negative value (to
signify that they wish to cancel this option).
|
|
- (D)isplay implemented: Each movie will be separated
onscreen by a line of stars. When the list of movies is long, to prevent
the output from scrolling off the screen your program should 'pause' the
display of movies every so often (say after displaying every 10th movie)
while it waits for a response from the user to tell it to continue (e.g.,
'Hit enter to continue'). The output must be displayed in a neat and
legible format (try running the sample executable for an example).
The program should display an appropriate status message if the list is
empty (e.g., "List is empty: nothing to
display"). (JT's hint: you should implement this feature soon
after you complete the add feature because it's essential for testing the
other features).
|
|
- (S)earch: The user types in the name of the movie (case
insensitive) to see full information about that movie. If the
list is empty then the program should inform the user of this fact and no
search should be performed. If the movie is not in the list, then your
program should indicate that the movie could not be found under that
name. If the movie is in the list, then your program will display
additional details about that movie (all the fields of that movie will be
displayed onscreen).
|
|
- (R)emove a movie from the list: You can implement one of two
versions of this features (you only get credit for one). In both cases the
program should produce some sort of error message if the list is already
empty when this feature is invoked.
|
|
|
- The simple version will just remove the last node from the list.
|
|
|
- The advanced version will prompt the user for the name of the movie to
remove. The program will then search for and remove the first instance of
that movie (case insensitive search). Similar to the search feature an
appropriate status message should be displayed if no matches were found.
|