Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java program QI. Write a program for a Movie Rental System. Given the UMLclass Movie that manages all its related information Movie - uitle: String
java program
QI. Write a program for a Movie Rental System. Given the UMLclass Movie that manages all its related information Movie - uitle: String - rating, int - price: double +numRented int +numAllMovies: int +Movie (String title, int rating, double price) +getRating0 : int + rento : void +Retum : void + display : void a. Provide a constructor that initializes the instance variables. b. Add a getter method for rating. c. Add a method named display to show all details of a movie. d. Provide a method rento to rent a movie. When a movie is rented the total number of movies is decreased by 1 Provide a method Return to return a movie. When a movie is returned, the total number of movies is increased by 1. ] e. QII. Write a test class named Movie Test that demonstrates class Movie's capabilities and performs the following: Create an object for the Movie class with the following data: Title Rating Price Avatar 5 20.30 b. Read one movie object. Print the information of all movies Print the number of available movies dStep 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