Question: use boolean if statements pls. Carl the Dog, like most humans, cares about how much food, play time, and walking time he gets, not just

use boolean if statements pls. Carl the Dog, like most humans, caresuse boolean if statements pls.

Carl the Dog, like most humans, cares about how much food, play time, and walking time he gets, not just if he has these things. He is also an older dog now (13) and as he has aged he has grown some peculiarities. Please read through the following conditions that cause Carl to be happy or not happy. In general Carl is happy if he has been fed between 1 and 3 cups of food and he has either been on a walk for between 30 and 60 minutes or has been played with for between 15 and 30 minutes. However, being an old dog, if he has had a combined play and walk time of 90 minutes or more, he will not be happy. He also doesn't like being short changed, so if he has met the minimum walk and play times, but they only combine to be 60 minutes or less, then he has to have 2 cups of food or more to be happy (but not more than 3, which makes him feel ill). Create integer variables for the walk and play quantities, and a double variable for the food variable; Name them appropriately. Implement the rules to determine if Carl is happy or not. Output a sentence that says if Carl is happy or not

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!