Question: Goal: Learn to access an object's methods. Assignment: In a garden tracking app, there is a fertilizerLogger object with a method called endDay. This method
Goal: Learn to access an object's methods.
Assignment: In a garden tracking app, there is a fertilizerLogger object with a method called endDay. This method takes a boolean
argument, which shows if the field was fertilized, and an int argument, which counts the days since the last fertilization. The method
returns true if you should not fertilize or already did allowing the day to end. But if the garden needs fertilization and it has not been
done, the method will return false.
Write some code that reads from the keyboard the two values, first the boolean and then the int, and call the endDay method. Repeat this
operation until endDay returns true.
Below you find examples of sample runs with user input between :
Sample Run :
false
Day Ended.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
