logo CodeStepByStep logo

seeMovie

Language/Type: Java if/else method basics parameters

Write a method seeMovie that indicates how interested you are in seeing a movie with your friends based on its price and rating. Your method should accept two parameters: the cost of a ticket in dollars, and the number of stars the movie received out of 5. The method should print console output about how interested you are. Print either very interested, sort-of interested, or not interested, based on the following criteria:

  • You like bargains. Any movie that costs less than $5.00 is one that you are very interested in.
  • You dislike expensive movies. You are not interested in seeing any movie that costs $12.00 or more, unless it got 5 stars (and even then, you are only sort-of interested).
  • You like quality. You are very interested in seeing 5 star movies that cost under $12.00.
  • You are sort-of interested in seeing movies costing between $5.00 - $11.99 that also got between 2-4 stars inclusive.
  • You are not interested in seeing any other movies not described previously.
Method: Write a Java method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.