Question 1 Report
The computer in an automated pet feeder releases food when the hopper contains food and either the feeding time has arrived or the owner has used the app. It must not release food if a bowl sensor reports that the bowl is full. The Boolean names are foodAvailable, feedingTime, appRequest and bowlFull.
(a) Give a Boolean expression for releaseFood. [4]
(b) State the output when foodAvailable is true, feedingTime is true, appRequest is false and bowlFull is true. [1]
(c) State the output when foodAvailable is true, feedingTime is false, appRequest is true and bowlFull is false. [1]
(d) State the output when foodAvailable is false, feedingTime is true, appRequest is true and bowlFull is false. [1]
(e) Give one test case where changing only bowlFull changes the output from true to false. [3]
The feeder needs food, a time-based or app-based request, and a bowl that is not full.
foodAvailable AND (feedingTime OR appRequest) AND NOT bowlFull. [4]NOT bowlFull is false. The output is false. [1]foodAvailable=true, feedingTime=true, and appRequest=false. With bowlFull=false, output is true; changing only bowlFull to true makes output false. [3]Everything you need to excel in your exams