Question: Consider a class RatingScore that represents a numeric rating for something such as a movie. Its attributes are -The description of what is being rated

Consider a class RatingScore that represents a numeric rating for something such as a movie.

Its attributes are

-The description of what is being rated

-The maximum possible rating

-The rating

It will have methods to

-Get the rating from a user

-Return the maximum rating possible

-Return the rating

-Return a string showing the rating in a format suitable for display

Note: The program should have logic to handle the case if the user enters an input greater then

the max possible rating.

Write a driver program that displays the functionality of the program.

hint

RatingScore movieRating = new RatingScore();

movieRating.initialize("Joe's excellent movie", 5);

RatingScore restaurantRating = new RatingScore();

restaurantRating.initialize("Food quality", 10);

Ex)

Standard Output: What is your rating for Joe's excellent movie?

Standard Output: Please enter an integer from 0 to 5

Standard Input: 3

Standard Output: Displaying the rating for the movie.

Standard Output: The rating is 3/5 for Joe's excellent movie

Standard Output: What is your rating for Food quality?

Standard Output: Please enter an integer from 0 to 10

Standard Input: 9

Standard Output: Displaying the rating for the restaurant.

Standard Output: The rating is 9/10 for Food quality

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!