Pearson Edexcel GCSE Computer Science (1CP2)Specification point 3.2.3

Edexcel 1CP2 3.2.3: Robust software

The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

Every program so far has trusted its user. Type twenty where a number is wanted and it crashes; type 500 and the robot drives off the table. Real users mistype, misunderstand, and sometimes try to break things on purpose. Defensive design means writing programs that expect this and cope with it. The first line of defence is validation: checking input before using it.

  • What goes wrong without it
  • The validation checks
  • Checking in order
  • Asking until it is valid
  • Length, format and look-up
  • Anticipating misuse
Read the free lesson (15 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. F6.1 Defensive design and validation Robust programs
    Anticipating misuse; presence, type, range, length, format and look-up checks.

Try it on a robot

The task from F6.1 Defensive design and validation, running here. Change the program and press Run.

Past paper questions on this

Real exam questions that test this, each worked through with a program you can run.

The specification is Edexcel's own document; this page says which of our lessons teach point 3.2.3 and is not endorsed by the board.