Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Suggest and apply suitable test data
Learning Objective/s:
  • Describe why test data is essential for verifying algorithm correctness.
  • Identify normal, boundary, and error test cases for a given algorithm.
  • Apply a systematic process to create and document test data and expected outcomes.
  • Evaluate algorithm performance using the selected test data.
Materials Needed:
  • Projector or interactive whiteboard
  • Printed handouts of algorithm pseudocode and test‑data tables
  • Computers with an IDE or programming environment
  • Whiteboard and markers
  • Sample data sheets for student practice
Introduction:
Begin with a quick question: How can we be sure an algorithm works for all possible inputs? Review students' prior experience testing simple programs and introduce today’s success criteria: students will be able to select appropriate test cases and apply them to verify algorithm behavior.
Lesson Structure:
  1. Do‑now (5’) – Students list three reasons why testing is important (check understanding).
  2. Mini‑lecture (10’) – Explain categories of test data (normal, boundary, error) with examples.
  3. Guided practice (15’) – Walk through the “Maximum in a List” example and fill a test‑data table together.
  4. Independent activity (20’) – Students create test data for an “average of a list” algorithm and record expected results.
  5. Peer review (10’) – Pairs exchange tables, run the algorithm on a computer, and note discrepancies.
  6. Whole‑class debrief (5’) – Discuss common pitfalls and reinforce the systematic process.
Conclusion:
Summarise the four‑step process for selecting test data and highlight how it uncovers hidden errors. For exit, each student writes one test case they found most challenging on a sticky note. Homework: complete a test‑data table for a sorting algorithm using at least six cases.