The answersDownload the PDF
Worksheet

A14.3 Analysis: requirements and success criteria

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

BugBotLab
NameClassDate

What this lesson is about

Stakeholders, fact finding, functional and non-functional requirements, and measurable success criteria that the robot checks for itself.

Questions 5 marks in all

  1. [1 mark]Which of these is a non-functional requirement?

    1. AThe robot must complete a delivery within 5 minutes
    2. BThe robot must stop before it reaches an obstacle
    3. CThe robot must signal when it arrives
    4. DThe robot must record which room each parcel went to
  2. [1 mark]Which success criterion can be measured?

    1. AThe robot stops with a gap of 18 to 22 cm to the wall
    2. BThe robot parks close to the wall
    3. CThe robot is easy to use
    4. DThe robot is quick
  3. [1 mark]An analyst watches office staff sending parcels for a morning. What is an advantage of observation over an interview?

    1. AIt shows what people actually do, not what they say they do
    2. BPeople always behave normally when watched
    3. CIt reaches hundreds of people quickly
    4. DIt lets the analyst ask follow-up questions
  4. [1 mark]According to AQA, how must the requirements of a system be established?

    1. ABy interaction with the intended users
    2. BBy the programmer deciding what is best
    3. CBy copying an existing product
    4. DAfter the system has been implemented
  5. [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 task: meet the success criteria

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.

QR code
Do it on the robot
www.bugbotlab.com/learn/a14-3-analysis-and-requirements/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Rewrite each vague requirement as a measurable success criterion: "The robot should be safe near students." "The app should look nice." "The battery should last."
  2. Office staff want deliveries in under 2 minutes; the site manager wants the robot below walking pace. How would an analyst resolve this?
  3. List three entities in a data model for the delivery system and one relationship between two of them.