Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Describe compilers and interpreters and how they operate
Learning Objective/s:
  • Describe the roles of compilers and interpreters in translating high‑level code.
  • Explain each phase of the compilation process (lexical, syntactic, semantic, optimization, code generation).
  • Compare execution speed, portability and typical use cases of compiled versus interpreted languages.
  • Apply knowledge by classifying sample languages as compiled or interpreted.
Materials Needed:
  • Projector and screen
  • Whiteboard and markers
  • Handout with compilation vs. interpretation diagram
  • Sample code snippets (Java, Python)
  • Laptops with IDEs installed
  • Worksheet for comparison activity
Introduction:

Begin with a quick poll: “When you run a program, does it happen instantly or does something happen behind the scenes?” Connect this to students’ prior knowledge of high‑level vs. low‑level languages. Explain that by the end of the lesson they will be able to identify how compilers and interpreters transform code and why the choice matters.

Lesson Structure:
  1. Do‑now (5'): Quiz on high‑level vs. low‑level languages (paper or digital).
  2. Mini‑lecture (10'): Introduce compilers and interpreters, show flow diagram.
  3. Guided walkthrough (15'): Step through each compilation phase using a short Java program.
  4. Interactive demo (10'): Run a Python script in an interpreter, discuss line‑by‑line execution.
  5. Comparison activity (10'): Students complete a table contrasting compiler and interpreter aspects.
  6. Check for understanding (5'): Exit‑ticket question – “When would you choose an interpreter over a compiler?”
Conclusion:

Recap the key differences between compiled and interpreted languages, emphasizing the phases of compilation and the line‑by‑line nature of interpretation. Collect exit tickets, then assign a short homework: research one language not covered and state whether it is typically compiled or interpreted, justifying the choice.