Programming Assignment -
Background information
For this assignment you need to write a console application in the Java programming language which implements a simulation for a movie borrowing and return system for the video store MovieMaster. The staff at MovieMaster will need to be able to maintain the details for rental movies that are available to hire by registered MovieMaster customers.
Rental movies may be available in bluray and/or DVD format and are also tagged as being either new release movies (which can only be borrowed for up to 2 days before needing to be returned) or weekly movies (which can be borrowed for up to 7 days before needing to be returned).
Bluray movies cost $5.00 to hire and DVD's cost $3.00 to hire. If a rental movie in either format is returned late then a late fee of 50% of the hire fee for the relevant movie type is charged for each day that has passed after the initial loan period for the movie in question.
MovieMaster staff will need to be able to perform the following tasks:
- Displaying a summary of the details for rental movies that are currently available for hire.
- Displaying all movies within a specified genre to allow MovieMaster staff to make recommendations to customers based on the type of rental movies they are interested in.
- Record details for movies that have been borrowed by MovieMaster customers.
- Record details for movies that have been returned by MovieMaster customers.
- Displaying full details for all rental movies that are currently available for hire.
You will be addressing these requirements by implementing a RentalMovie class to encapsulate the details and functionality for a single RentalMovie that has been made with MovieMaster, as well as implementing a console application which creates a set of RentalMovie objects and simulates the functionality of the service recording and management system as described above.
Assignment Overview
In this assignment you will be developing a simple service recording and management system for MovieMaster, which is a mechanical servicing business which offers rental movies for hire.
The first stage in this task will be to develop a simple RentalMovie class which encapsulates the details for a single RentalMovie that is available for hire from the MovieMaster store.
The design and required functionality for this RentalMovie class will be described in stage 1 of this specification.
In the second stage for this task you will be required to demonstrate your understanding of core object-oriented programming concepts by showing how the RentalMovie class can be instantiated to create many RentalMovie objects and how the details contained within these RentalMovie objects can be viewed, queried and updated.
Stage 1 - Implementing the RentalMovie class
You are required to implement a class named RentalMovie to model the details of rental movie that is available for hire from the MovieMaster store.
a) Define private instance variables to store basic RentalMovie details:
Also define the private boolean instance variables:
b) Provide a pre-defined constructor for the class.
c) Implement a method public double returnMovie(int daysBorrowed)
d) Implement a method public void displayMovieDetails()
Stage 2 - Using the RentalMovie class
a) Declare and instantiate array of RentalMovie references named movies that can hold up to six (6) RentalMovie objects.
b) Create 6 RentalMovie objects with the details shown below - passing the values specified to the constructor for each object in an appropriate manner - and store each object in the next vacant position in the movies array described above.
c) Display customised (selective) data (movie ID and movie title / genre) for each of the RentalMovies stored in the movies array, as shown below in the sample screenshot:
d) Allow the user to specify a particular genre that they wish to list rental movies for and then execute a search and display the movie ID, title and media type for all RentalMovies that belong to that particular genre.
e) Implement a menu-driven Movie Borrowing / Returning feature, which allows the user to record details for movies that have been borrowed and returned, as well as displaying details for all movies currently in the system.
Attachment:- Assignment.rar