Question
Java Programming A. Objectives 1. Using arrays to store and process data (10 points) 2. Use at least one array of objects (10 points) 3.
Java Programming
A. Objectives
1. Using arrays to store and process data (10 points)
2. Use at least one array of objects (10 points)
3. Use sorting to arrange data (10 points)
4. Use methods to do separate and repetitive work. The main method should not have more than 20 lines of code (10 points)
5. Implement the project correctly (50 points)
10 points will be awarded for use of meaningful identifiers, consistent indentation, explanatory comments in your code and properly formatted output, including screen shots of execution.
B. Description
Netflix provides an online video streaming service. Users can browse and choose videos based on their preference; titles can also be sorted based on ratings and other attributes. For this project, we simulate a movie streaming service similar to Netflix, but on a much smaller scale. Each movie has the following attributes: Name, year, running time (minutes), genre, rating (on a scale of 10). The following needs to be done as part of the project:
1. Create a data set of 30 movies
2. Assign names to each of the 30 movies (you can use actual movie names, or Movie1, Movie2, ..., Movie30)
3. Assign a random year to each of the movies (the range of the year would be 1920 to 2017), such that there is no more than one movie in a year
4. Assign a random running time to each of the movies (the range would be 60 to 200 minutes)
5. Assign a genre to each movie choosing from one of the following: Comedy, Drama, Sci-Fi, Action, Documentary; make sure there are no more than 10 movies in any category
6. Assign a random rating to each movie (range 0.1 to 10.0)
Use a separate class to create the movie objects. All the movie objects must be stored using an array. You can use additional arrays as necessary. The sorting code must be included as part of the project. Create a menu based program with the following options:
1. List all the movies
2. Display the movies sorted according to year, starting with the oldest one
3. Sort the movies according to running time, starting with the shortest
4. Sort the movies according to ratings, starting with the highest rating
5. Ask user for a genre, and display all the movies belonging to that specific genre
6. Search for a specific movie by name, and display all the details if the movies exists
7. Add a movie to the list of movies (ask the user for all the details)
8. Exit The program continues to execute until the user selects option to Exit. The user is allowed to add a maximum of 5 movies.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started