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

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
  • 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: