Question: Consider a class RatingScore that represents a numeric rating for something such as a movie. Its attributes are A description of what is being rated
Consider a class RatingScore that represents a numeric rating for something such as a movie. Its attributes are
- A 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
a. Write a method heading for each method.
b. Write preconditions and postconditions for each method.
c. Write some Java statements that test the class.
d. Implement the class.
Step by Step Solution
3.40 Rating (169 Votes )
There are 3 Steps involved in it
a public void inputRating public int getMaxRating public int getRating public String getRatingString ... View full answer
Get step-by-step solutions from verified subject matter experts
