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. I...

Assessment: Computer Science 9210 | Paper 2 Mock 01 | Concepts and principles of computer science Subject: Computer Science - 9210

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]

Answer Details

The feeder needs food, a time-based or app-based request, and a bowl that is not full.

  1. (a) foodAvailable AND (feedingTime OR appRequest) AND NOT bowlFull. [4]
  2. (b) The request route is true, but the bowl is full, so NOT bowlFull is false. The output is false. [1]
  3. (c) Food is available, the app request is true, and the bowl is not full. The output is true. [1]
  4. (d) No food is available, so the output is false. [1]
  5. (e) For example, set foodAvailable=true, feedingTime=true, and appRequest=false. With bowlFull=false, output is true; changing only bowlFull to true makes output false. [3]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning