| Lesson Plan |
| Grade: |
Date: 03/03/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:
- Do‑now (5’) – Students list three reasons why testing is important (check understanding).
- Mini‑lecture (10’) – Explain categories of test data (normal, boundary, error) with examples.
- Guided practice (15’) – Walk through the “Maximum in a List” example and fill a test‑data table together.
- Independent activity (20’) – Students create test data for an “average of a list” algorithm and record expected results.
- Peer review (10’) – Pairs exchange tables, run the algorithm on a computer, and note discrepancies.
- 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.
|