Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Show understanding of recursion
Learning Objective/s:
  • Describe the structure of a recursive method, including base case, recursive case, and progress toward termination.
  • Explain how the call stack manages recursive calls and returns.
  • Apply recursion to solve typical problems such as factorial, Fibonacci, binary search, and tree traversals.
  • Analyse the advantages and disadvantages of recursion and identify common pitfalls.
  • Convert a recursive solution to an equivalent iterative version.
Materials Needed:
  • Projector and screen for slides/diagrams.
  • Whiteboard and markers.
  • Computers with a Java IDE installed.
  • Printed handouts of recursive algorithm examples.
  • Sample code snippets (factorial, Fibonacci, binary search).
  • Worksheets for tracing the call stack.
Introduction:

Begin with a quick challenge: “How would you compute 4! without using any loops?” Connect this to students’ existing knowledge of loops and basic Java syntax. State that by the end of the lesson they will be able to write, trace, and explain a recursive method and its execution model.

Lesson Structure:
  1. Do‑now (5'): Write the steps to calculate 4! using repeated multiplication; share answers.
  2. Mini‑lecture (10'): Define recursion, base case, recursive case, and illustrate the call stack with a factorial diagram.
  3. Guided coding (15'): Students implement recursive factorial and Fibonacci methods in the IDE while the teacher checks understanding.
  4. Interactive demo (10'): Trace factorial(3) on the board, showing stack frames and progress toward the base case.
  5. Group activity (15'): Teams analyse recursive binary search code, identify base/recursive cases, and predict outcomes on a sample array.
  6. Pitfalls & optimisation (10'): Discuss common errors, stack overflow risks, and introduce tail recursion with a tail‑recursive factorial example.
  7. Exit ticket (5'): Write one advantage, one disadvantage of recursion, and a scenario where iteration is preferable.
Conclusion:

Recap the key components of recursion, the role of the call stack, and how to avoid typical mistakes. Collect the exit tickets to assess understanding. For homework, assign a worksheet that requires converting the recursive Fibonacci method into an iterative version.