Implement java code for these sub-menu items

Assignment Help JAVA Programming
Reference no: EM131241775

A. Requirements

a) ALL instructions given in this document MUST be followed in order to be eligible for full marks for the project. This document has five (5) pages.

b) This project is NOT a group assignment; collusion, plagiarism, cheating of any kind is not acceptable. As part of your submission you MUST certify that all work submitted is your own. If you cannot honestly certify that the work is your own then do not submit the project. Breaches of the Misconduct Rule will be dealt with according to the university Rule (see the learning guide for more information).

c) All project submissions will be checked for academic misconduct by the use of the MOSS program from Stanford University. Details on MOSS can be obtained from the MOSS web site https://theory.stanford.edu/~aiken/moss/

For the problem definition described in section B you must

d) include your student id at the end of all filenames for all java code file. Two classes have been identified in section B as being required as part of your solution. Do not modify the names of these classes except for adding your student id to the end of the filename. Other Java files will be needed as part of your solution. All Java code files that are used in this project MUST have your student id appended to the filename. For example Movie_########.java;

e) include your authorship details at the top of each file in code comments (see item 3.1 in Section C of this document for details);

f) adhere to the coding standard as identified in the Google Java Style Guide (see Section C of this document for details);

g) ensure that standard Input/Output are used in all code segments, do not use Swing;

h) ensure that your java code is appropriately modularised for the given problem definition. That is, you need to write appropriate classes and methods to solve the problem;

i) not use any dynamic data structures such as arraylists. If you are unsure if you can use a particular data structure check with the unit coordinator first;

j) reference all sources that you used for inspiration of your solution as per Section D of this document;

k) Ensure that your java code compiles and runs in Eclipse 4.5.2 (Mars.2)

B. Project Details

B(i) - Background information and description

Software such as iTunes and MediaPlayer enable easy access to, and organization of, digital media such as music, movies, podcasts, and books. The software typically allows the user to view their collection of digital media via different views; for example, the user may view their collection of movies by Title, Genre, and Rating. The software also allows the user to create customised playlists that contain movies of their choice from their digital library.

In this assignment your task is to create an object-oriented menu-driven Java program that implements a limited set of functionality similar to iTunes for movies (but without the GUI).

To do this your program will need to read data from the keyboard and from certain text files in secondary storage, store the data in appropriate data structures using objects, sort the data, and write output data to both the screen and to secondary storage. The specific functional requirements are described in section B(ii). The text files that are to be used for this programming project are described in section B(iii). The classes that must be used as a minimum are described in section B(iv).

B(ii) - Program Requirements/Functionality

The Java program must

a) be object-oriented utilising the classes described in section B (iv) as a minimum. Other classes may also be needed to solve the program requirements;

b) be menu-driven. The main menu must have the following menu items:

1. Movies
2. Playlists
3. Save
4. Exit Program

c) be able to process the defined text files. The text files and their formats are described in section B (iii).

Program Start Up
When the java program starts it must perform the following file related operations:

d) Read the data from the movieLibrary.txt file into computer memory into an appropriate array of objects (see section B (iii) for a description of the movieLibrary text file and section B (iv) for a description of the Movie class). If the movie library file does not exist then the user should be informed of this and given the option of either creating a new (empty) movie library file or providing an alternative filename that contains the library of movies;

e) Read the data from the playlist.txt file into computer memory into an appropriate array of objects (see section B (iii) for a description of the playlist text file and section B (iv) for a description of the Playlist class). If the playlist file does not exist this simply means that there are no playlists created for the current library of movies;

After processing these files the program should display the main menu identified in section B(ii)(b) above.

Main Menu Item Functionality
The required functionality for each menu item is described as follows:

1. Movies - when this menu option is selected the following sub-menu should be displayed:
1. Display Movies
2. Sort Movies
3. Rate Movie
4. Change Movie Genre
5. Add Movie to Library
6. Exit Sub-menu

Implement Java code for these sub-menu items as follows:

1. Display Movies - the program must display the complete library of movies to the screen in an appropriate readable format. Display the movie title, duration, genre, classification and rating.

2. Sort Movies - when this menu item is selected the following sub-menu should be displayed:

1. by title

2. by genre

3. Exit Sub-menu

Implement Java code for these sub-menu items as follows:

1. by title - sort the entire library of movies alphabetically by movie title

2. by genre - sort the entire library of movies alphabetically by genre

3. Exit Sub-menu - program control should return to the previous menu.

3. Rate Movie - when this menu item is selected the user should be able to search for a movie by its title and then rate it. Ratings for movies are whole or half numeric values between 0 and 5. For example, ratings of 3 and 4.5 are valid but ratings of 1.2 or 2.9 are not valid.

4. Change Movie Genre - when this menu item is selected the user should be able to search for a movie by its title and then set the genre for the movie. The genre should be chosen by the user from the following possible values: Action, Adventure, Comedy, Crime, Fantasy, Family, Romance, Horror, Drama, Sci-Fi, Thriller.

5. Add Movie to Library - when this menu item is selected the user should be able to enter the details for a movie they wish to add to the movie library. After the details have been obtained from the user the movie should be added to the movie library array.

6. Exit Sub-menu - program control should return to the main menu.

2. Playlists - when this menu option is selected the following sub-menu should be displayed:

1. Display Playlists
2. Create Playlist
3. Add Movie to Playlist
4. Exit Sub-menu

Implement Java code for these sub-menu items as follows:

1. Display Playlists - the program must display the names of each of the playlists. The user should then be able to choose one of these playlists. Doing so will display to the screen the movies that are in the chosen playlist. When displaying the movies you must display the movie title, duration, genre, classification and rating.

2. Create Playlist - the program must create an empty playlist. Obtain from the user a name for the new playlist and store the playlist in an appropriate array.

3. Add Movie to Playlist - the program must add a movie from the library to an existing playlist. To do this the user will need to choose the playlist to which they wish to add the movie and they will need to choose the movie to add from the library.

4. Exit sub-menu - program control should return to the main menu.

3. Save - the program must write the movie library data back to the movieLibrary.txt file and write all playlists to the playlists.txt file

4. Exit Program - the program must terminate when this menu item is selected. The program should not terminate until this option is chosen. At other times the program should return to display the Main menu after completing the chosen menu option.

B(iii) - Text files to be processed

The data that is to be manipulated by your Java program in this programming project is contained in the text files movieLibrary.txt, and playLists.txt. Examples of these files are found in the zip file for this programming project. The data within these text files will need to be read into memory by your program so that it may be manipulated to solve many aspects of the required functionality of this programming project. The text files have been created to conform to a particular format. The format for each file is described below:

File: movieLibrary.txt

This file contains a full record of all movies currently held in a digital movie library. Each line within the file represents a movie from the library, and has the following format:

Movie ID, Movie Title, Director, Writer, Duration, Genre, Classification, Release Date, Rating where each data item is separated by a comma (,).

A brief explanation of each of these data items:

Movie ID: a unique numeric identifier for a movie

Movie title: the title/name of the movie

Director: the name of the director of the movie

Writer: the name of the writer of the screenplay

Duration: the duration of the movie in hours (eg a duration of 3.5 = 3 hours and 30 minutes) Genre: a categorization of the movie (for example, Action, Adventure, Family, Fantasy, etc) Classification: a classification of the movie (for example, G, PG, M, MA 15+, etc)

Release Date: when the movie was released.

Rating: a numeric value in the range 1 to 5 indicating the users rating for the movie (this may not have a value if the user hasn't rated the movie yet)

One (1) movieLibrary.txt file has been provided in the project zip file.

File: playLists.txt

This file contains a full record of all playlists for the movie library. Each line within this file represents an individual playlist, and has the following format:

Playlist ID, Name, Length, Movies
where each data item is separated by a comma (,). A brief explanation of each of these data items:

Playlist ID: a unique numeric identifier for the playlist

Name: a name for the playlist

Length: the number of movies in the playlist

Movies: a list of zero or more Movie IDs which make up this playlist

One (1) playLists.txt file has been provided in the project zip file.

Please note that for the purpose of marking the project the number of lines of data and the data values in the text files will be replaced with different data by the marker. This is to ensure that your solution has not relied upon specific data values or the number of lines in the text files to work. You should therefore test your program with different data files of varying length and varying data before submission.

When reading the text files into memory the data should be read into appropriate array(s) of objects. The classes for these objects are briefly outlined in section B(iv).

B(iv) - Required Classes

To write your solution for this assignment it is a requirement that you write appropriate code for at least the following java Classes:
a) Movie
b) Playlist

These classes are described in general terms as follows:

a) Movie class: the Movie class represents an individual movie within the movie library. The Movie class needs data fields for the Movie ID, movie title, director, writer, movie duration, genre, movie classification, and the release date. Implement appropriate constructors, accessors, mutators and other appropriate methods for this class based upon the general requirements of the assignment specification.

b) Playlist class: the Playlist class represents a collection of movies that have been chosen by the user from the library. The Playlist class needs data fields for the playlist ID, the playlist name, the playlist length (this is the number of movies in the playlist), playlist duration (the total duration of all movies in the playlist), and movies (this is the list of movie IDs which make up the playlist). Implement appropriate constructors, accessors, mutators and other appropriate methods for this class based upon the general requirements of the assignment specification.

Attachment:- Project2016.rar

Reference no: EM131241775

Questions Cloud

Calculate the efficiency of an engine : Calculate the efficiency of an engine in a power plant operating between 45 ° C and 350 ° C. Remember that the efficiency is a decimal number less than 1.
Joules is needed to raise the temperature : How much heat in joules is needed to raise the temperature of 4.0 L of water from 0°C to 80.0°C? (Hint: Recall the original definition of the liter.)
Distribution might have some large outliers : Suppose Y is a random variable with mu Subscript Upper YμY ?= 0, and sigma Subscript Upper Y Superscript 2σ2Y ?= 1, skewness? = 0, and kurtosis? = 100. Explain why n random variables drawn from this distribution might have some large outliers.
Determine the force that goes with this potential : Lennard-Jones formula U(r)=k[(a/r)^12 - 2(a/r)^6] where r is the center-to-center distance between the atom and k is a positive constant. a) plot U vs r. b) determine the force that goes with this potential. c) show that the equilibrium separation..
Implement java code for these sub-menu items : 300581: Programming Techniques - Implement Java code for these sub-menu items -the program must display the complete library of movies to the screen in an appropriate readable format. Display the movie title, duration, genre, classification and rat..
What types of problems are caused for the organization : When a company acts in an ethically questionable manner what types of problems are caused for the organization and its customers?
How an ict consulting team can analyze strategies for client : ISIT901/ISIT401 Information Systems and Strategy Group Project. This group project focuses on how an ICT consulting team can analyze and develop good strategies for their client company. You are required to: Present executive summary
Determine the force that goes with this potential : Lennard-Jones formula U(r)=k[(a/r)^12 - 2(a/r)^6] where r is the center-to-center distance between the atom and k is a positive constant. a) plot U vs r. b) determine the force that goes with this potential. c) show that the equilibrium separation..
What would you suggest as the proper organizational relation : What would you suggest as the proper organizational relations between the research and development department of a company producing products for industrial use (e.g. machine tools) and its marketing department?

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Write program in java that solves system of linear equations

Write a program in java that solves system of linear equations. Users should be able to input the number of variables.

  In this project you need to write a program called

in this project you need to write a program called ecc.javato implement elliptic curve

  Most of the companies use virtualization to make test

write a 200- to 300-word short-answer response to the following many companies use virtualization to create test

  Write a short java application

You will write a short Java application that will accept five strings from the user. Each String will be a word in a sentence.

  Perform a unit test of the shoutbox

Perform a unit test of the MyClone to test all getters and setters and methods - Perform a unit test of the ShoutBox to test all methods.

  Program implements the functionality of a deck of cards

Write a complete program using "ECLIPS" that implements the functionality of a deck of cards. In writing your program, use the provided DeckDriver and Card classes shown below. Write your own Deck class so that it works in conjunction with the two..

  What does each part of sharedpreferences data pair represent

What does each part of the SharedPreferences data pair represent? Explain each part of the pair. Name five ways to store data in an app. Why should an app not store massive amounts of data using internal storage?

  Methods prevent us from modularizing a program

QUESTION 1Which is true about methods Methods prevent us from modularizing a program protecting it from fragmentation. Methods allow us to modularize a program.

  Program that asks how many automobiles are to be described

Write a program that asks the user how many automobiles are to be described, and for each automobile it inputs the user's selection of make and color.

  A common useful equation

In physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initial position s0, initial velocity v0, and rate of acceleration a, is the following: ??= ??0+??0??+12????2. Write code to de..

  Create a graphical application stackdemogui

Create a graphical application StackDemoGUI that provides a button for push and pop from a stack, a text field to accept a string as input for push, and a text area to show the contents of the stack after each operation.

  Employee type and the number of hours

Write a program that calculates the salary for the employee. The hourly rate for permanent staff (P) is 200, contract staff (C) is 150 and temporary staff (T) is 100. The program accepts the employee type and the number of hours the employee work.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd