Question: Objectives Be able to construct boolean expressions Using java to evaluate a given condition Be able to compare String objects Be able to use a

Objectives
Be able to construct boolean expressions Using java to evaluate a given condition
Be able to compare String objects
Be able to use a flag
Be able to construct if and if-else-if statements to perform a specific task
Movie Selector
Imagine you're hosting a movie night with your friends and have prepared a selection of five movies:
Batman - Family: No, Comedy: No, Award-Wining: No
Frozen - Family: Yes, Comedy: No, Award-Wining: Yes
Home alone - Family: Yes, Comedy: Yes, Award-Wining: Yes
Happy Holidays - Family: Yes, Comedy: No, Award-Wining: No
The Secret Life of Pets - Family: Yes, Comedy: Yes, Award-Wining: Yes
Your task is to write a program that prompts the users to specify if they want to filter the movie choices based on family-friendliness, comedy genre, or award-winning status, and then displays the movies suitable for the group.
Please note: The program should accept both "Yes" and "yes" as affirmative responses.
Example Outputs:
Here is an example of the program's output:
Sample 1:
Here is an example of the program's output:
Sample 1:
This program will help you select a movie.
Does anyone in your party want only a family movie? (Enter yes or no): yes
Does anyone in your party want only a comedy movie? (Enter yes or no): no
Does anyone in your party want only an award-winning movie? (Enter yes or no): yes
Here are your movie choices:
Frozen
Home alone
The Secret Life of Pets
Sample 2:
Here is another example of the program's output:
This program will help you select a movie.
Is anyone in your party interested in a family movie? (Enter yes or no): yes
Is anyone in your party interested in a comedy movie? (Enter yes or no): no
Is anyone in your party interested in an award-winning movie? (Enter yes or no): no
 Objectives Be able to construct boolean expressions Using java to evaluate

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!