Ask for two integers - the first is their goal amount and the second is the actual amount. The goal could be anything - eating 5 vegetables a day, spending 60 minutes outside, practing the flute for 45 minutes, etc. Then create three boolean variables, as described below, to help the user determine whether they met their goal. The first boolean should be true if the user went over their goal. The second boolean should be true if the user was under their goal. The third boolean should be true if the user met their goal exactly. Then print the results (that is, the value of the booleans). Here is an example: Enter your goal: 45 Enter your actual amount: 35 Went over goal? false Did not meet goal? true Met goal exactly? false

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question

in java pl

Ask for two integers - the first is their goal amount and the second is the actual
amount. The goal could be anything - eating 5 vegetables a day, spending 60
minutes outside, practing the flute for 45 minutes, etc.
Then create three boolean variables, as described below, to help the user
determine whether they met their goal.
The first boolean should be true if the user went over their goal.
The second boolean should be true if the user was under their goal.
The third boolean should be true if the user met their goal exactly.
Then print the results (that is, the value of the booleans).
Here is an example:
Enter your goal:
45
Enter your actual amount:
35
Went over goal? false
Did not meet goal? true
Met goal exactly? false
Transcribed Image Text:Ask for two integers - the first is their goal amount and the second is the actual amount. The goal could be anything - eating 5 vegetables a day, spending 60 minutes outside, practing the flute for 45 minutes, etc. Then create three boolean variables, as described below, to help the user determine whether they met their goal. The first boolean should be true if the user went over their goal. The second boolean should be true if the user was under their goal. The third boolean should be true if the user met their goal exactly. Then print the results (that is, the value of the booleans). Here is an example: Enter your goal: 45 Enter your actual amount: 35 Went over goal? false Did not meet goal? true Met goal exactly? false
Expert Solution
steps

Step by step

Solved in 6 steps with 4 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage