SHSubjectHub

Defensive Design

OCR J2772.3aGCSELesson packSubscription
Also online

This worksheet marks itself

Set it as homework or classwork and every answer is marked as pupils go, with feedback on what they got wrong. The scores go straight into your mark book, so you can see who needs help before the next lesson.

  • 7 questions
  • 24 marks
  • about 18 minutes
  • marked instantly

Question types: multi-part, matching, multiple choice, true or false, short answer.

Try one from this worksheet

What is the difference between validation and verification?

Pick an answer: it's marked straight away, just as your pupils would see it.

About this resource

Understand input validation techniques (type, range, presence, format, length checks), anticipating misuse, and authentication in programs.

12 slides.

Lesson outline

  1. What Is Defensive Design?
  2. Input Validation
  3. Validation in Code
  4. Validation Flowchart
  5. Code Demo: Complete Validation
  6. Validation Check Types
  7. Anticipating Misuse
  8. Coding Challenge: Robust Calculator
  9. Authentication
  10. Task: Identify the Validation
Unit bundle2.3 Robust Programs
Part of: 2.3 Robust Programs: the whole unitEvery resource in the unit in one zip.

More from 2.3 Robust Programs