New concepts to be applied for this assignment:
-
Dynamic (singly linked) lists
File input and output is not necessary for this assignment. The data for the lists will be manually entered by the user at run time. The program wont save the list contents to file.
Description:
For this assignment you are to write a program that allows a person to manage their movie collection. The full version will perform some common list management functions such as: adding, displaying, removing or searching. There should not be a limit on the number of movies that can be added.Each movie will be described by four fields:
- Movie name
- The names of the first three cast members
- The genre of the movie
- The number of stars (the rating of the movie)
Description of the fields
- Movie nameThis field consists of an alpha (and sometime numeric string e.g., STAR TREK II can also be titled as STAR TREK 2).
- CastThe 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.,
- GenreThe 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 dont have worry about checking for instances where a movie falls into multiple genres.
- RatingThis 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): Its not the type of movie thats so bad that its good, its just all bad. Dont waste your time with this one.2 stars (Poor): Overall there were more things that I disliked than liked with this movie. Unless theres a ticket sale its probably one that you should avoid.3 stars (Average): There were some things that I liked and some things that I disliked. Its one that you may want to rent/stream rather than buy.4 stars (Good): This movie has some flaws but overall youll 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 DAYArnold SchwarzeneggerLinda HamiltonEdward FurlongAction5************ITS A WONDERFUL LIFEJames StewartDonna ReedLionel BarrymoreDrama5************ROMEO AND JULIETLeonard WhitingOlivia HusseyJohn McEneryDrama4************<style=line-height: normal=>ONCE UPON A TIME A HERO IN CHINACharine ChanTony Leung Kai FaiPeeking Duck aka James TamMartial Arts3************1. JT: The number of stars given to the movies in the example was based solely upon my opinion and does not necessarily reflect the opinions of the university so please dont write angry letters outrage because you thought I didnt properly rate your favourite flick ☺.
Classes
The basic structure is very similar to the Dice/User interface program to be covered in tutorial:
-
- Driver: contains the main method which kicks things off by calling a start method of class UserInterface.
- UserInterface: handles user input and output, the start method will likely contain the main program loop that only ends when the user quits the program. To actually change or view the list the user interface class will invoke methods of class Manager. These operations must not be directly implemented in the user interface.
- Manager: handles all list operations such as adding, removing etc.
- MovieNode: A linked list node whose data attribute is a movie.
- Movie: Stores data associated with an individual movie (instances contains the 4 attributes associated with a movie such as name, cast etc.)
Program features
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Using pre-written Java code
Aside from common sense operators and operations such as those for input/output, unless you are told otherwise, you will need to write your own code and cannot use other pre-written Java classes or operators. Obviously you should not use Java classes that implement a linked list but you can use interfaces that specify a design if you wish.
Marking
To help you ensure that you havent missed anything here is a [marking checklist]
Points to keep in mind:
- Due time: All assignments are due at 4 PM on the due dates listed on the course web page. Late assignments or components of assignments will not be accepted for marking without approval for an extension beforehand. What you have submitted in D2L as of the due date is what will be marked.
- Extensions may be granted for reasonable cases by the course instructor with the receipt of the appropriate documentation (e.g., a doctors note). Typical examples of reasonable cases for an extension include: illness or a death in the family. Cases where extensions will not be granted include situations that are typical of student life: having multiple due dates, work commitments etc. Tutorial instructors (TAs) will not be able to provide extension on their own and must receive permission from the course instructor first. (Note: Forgetting to hand your assignment or a component of your assignment in does not constitute a sufficient reason for handing your assignment late).
- Method of submission: You are to submit your assignment using D2L [help link]. Make sure that you [check the contents of your submitted files] (e.g., is the file okay or was it corrupted, is it the correct version etc.). Its your responsibility to do this! (Make sure that your submit your assignment with enough time before it comes due for you to do a check).
- Identifying information: All assignments should include contact information (full name and student ID number) at the very top of your program in the class where the main() function/method resides.
- Collaboration: Assignments must reflect individual work, group work is not allowed in this class nor can you copy the work of others. For more detailed information as to what constitutes academic misconduct (i.e., cheating) for this course please read the following [link].
- Execution: programs must run on the computer science network. If you write you code in the lab and work remotely using a remote login program such as Putty or SSH. If you choose to install Java on your own computer then it is your responsibility to ensure that your program will run properly here. Its not recommended that you use an IDE for writing your programs but if you use one then make sure that you submit your program in the form of individual text .java files (one for each class that you define).
- Source code: in order to get any credit for your work you must submit all relevant dot-java files for the assignment (e.g., Driver.java). If you only submit your byte code files (e.g. Driver.class) then you will not be awarded any credit.
D2L configuration for this course
- You can (and really should) submit work as many times as you wish before the due date
- D2L will only retain whatever files that you submitted the last time that you uploaded to D2L, previous files will not be retained (e.g. if you submit files: A.java, B.java, C.jpg the first time and then you submit A.java the second time then D2L will only have one file stored: A.java. That means that you should submit every file associated with the assignment each time that you want to submit something regardless of how many of those files were actually changed since the last submission.
5/5 – (6 votes)
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 |
Reviews
There are no reviews yet.