Question
implement and test an application that acts as main-memory database containing information about movies. All the records with movie information will be stored in an
implement and test an application that acts as main-memory database containing information about movies. All the records with movie information will be stored in an ArrayList. The insertion of each movie record will be based on the movie tittle. For simplicity we will assume movie tittles consisting of one word. For example: Alien, Titanic,..
In reality, each element of the ArrayList will not have simply the movie tittle, but an Object of type Movie that has the following information:
1. Movie Tittle
2. Movie year of realease
3.Duration of the movie (minutes)
4. Number of copies available
5. A sorted ArrayList with the names of the actors
You will implement the following operations for the movie database application, using the class called the DataManager.
1. Add movie - add a new movie object to the movie database.
2.Delete movie - deletes a movie object from the movie database.
3. Insert movie - insert a movie in the database in the right lexographical order.
4. Find movie - finds the information record for a movie.
5. Find movie by actor name - finds all movies for a given actor. Returns a new ArrayList with them.
6. Find movies by year - finds all movies made in a given year. Returns a new ArrayList with them.
7. Find movies by time period - find all movies in a given time period (e.g. 1980-1985). Returns a new sorted ArrayList with all movies in the indicated time period.
8. checkIn - to return a rented movie.
9. checkOut - to rent a movie to a costumer.
10. Find movies by costumer - find all the movies rented by a given costumer.
11. Print movies in order - prints all the movies in the database in order.
12. Print customers in order - prints all the costumers in the record in order.
Name Class
The name class will represent the name of an actor in a movie or a customer renting. It will have two private fields, the actor's last name and the actor's first name.
Customer Class
The customer class will have a private name object represent the customer renting the movie. It will have private ArrayList object which contains the list of Movies rented by the customer and a static customerID.
Data Manager
You must implement a Data Manager class that will maintain the ArrayList of movies. The Data Manager has the sorted ArrayList of movies as a private member, sorted ArrayList of customers as a private member. The Data Manager provides the interface to perform all the maintenance operations on the movie database. These operations were mentioned at the beginning of this document.
Data Base
This class will be used to test the movie database. It will generate a database of movies that will be initialized by adding the needed data and perform the allowed operations as listed above on the created database. The renting record should be saved locally. It is preferred to have menu listing all the allowed operations.
Project Deliverables:
1. Report which contains the problem statement, source code, Class Diagram design of the problem showing all the interclass's relations.
5 movies and 3 users for initialization.
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