Write an if statement that uses the flag as the condition


1. Write an if statement that uses the flag as the condition. Remember that the flag is a Boolean variable, therefore is true or false. It does not have to be compared to anything.

2. The body of the if statement should contain two statements:

a) A statement that prints a message indicating that the user is eligible for a $2.00 discount.

b) A statement that reduces the variable cost by 2.

3. Compile, debug, and run. Test your program using the ownersâ?? names (both capitalized and not) as well as a different name. The discount should be correctly at this time.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write an if statement that uses the flag as the condition
Reference No:- TGS0625533

Expected delivery within 24 Hours