Software development, law and ethics · A level · OCR H446 1.2.3, AQA 7517 4.13.1.1, Eduqas A500QS 1.5 · about 40 min
Stakeholders, fact finding, functional and non-functional requirements, and measurable success criteria that the robot checks for itself.
[1 mark]Which of these is a non-functional requirement?
[1 mark]Which success criterion can be measured?
[1 mark]An analyst watches office staff sending parcels for a morning. What is an advantage of observation over an interview?
[1 mark]According to AQA, how must the requirements of a system be established?
[1 mark]A program checks its own success criterion. What does this print?
GAP_LOW, GAP_HIGH = 18, 22
for gap in [17.9, 18, 22, 22.1]:
print(gap, "met" if GAP_LOW <= gap <= GAP_HIGH else "not met")The robot starts 71 cm from the charging wall, facing it. Write a program that meets these success criteria, then checks each one and prints the result:
- SC1: the robot stops with a gap of 18 to 22 cm (inclusive) between it and the wall, measured with distance().
- SC2: it has stopped within 20 seconds of the program starting, measured with clock().
- SC3: when parked, the LED turns green and an 880 Hz note plays.
After parking and signalling, print exactly three lines:
- SC1 gap <cm> cm: <result>, where <cm> is the gap read after stopping;
- SC2 time <seconds> s: <result>, where <seconds> is clock() read after stopping;
- SC3 signal: met.
Each <result> is met or not met, decided by an if that compares the measurement with the limits in GAP_LOW, GAP_HIGH and TIME_LIMIT. Do not touch the wall.
# the two lines every program starts with: the commands, then the robot from bugbot import * connect() GAP_LOW, GAP_HIGH = 18, 22 # SC1, in cm TIME_LIMIT = 20 # SC2, in seconds
Plan your program here, then type it in and press Run.