Exercise 3 Week 2 - Java Tutorial Cat Trouble IF Else Statements Boolean Values

Опубликовано: 04 Март 2025
на канале: Red Stag Digital
328
2

For more: http://redstagdigital.com/

Next Video:    • Exercise 4 Week 2 - Java Tutorial All...  
Description of Problem:
We have two cats, a and b, and two parameters aSmile and bSmile to indicate if each is smiling. We are in trouble if both cats are smiling or if neither of them are smiling. Print out "We are in big trouble!" to the screen if we are in trouble.


Objective:
Write a Java program called CatTrouble that prompts the user to enter two boolean values, the first boolean value indicates if cat a is smiling, the second boolean value indicates if cat b is smiling. Print out "We are in big trouble!" to the screen if they are both smiling or if neither of them are smiling.