Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Show understanding of program libraries
Learning Objective/s:
  • Describe what a program library is and differentiate static, dynamic, and import libraries.
  • Explain how static and dynamic linking affect executable size, memory usage, and update processes.
  • Analyse the dynamic linking process performed by the OS loader.
  • Evaluate advantages and disadvantages of using libraries in software development.
  • Apply versioning concepts to assess compatibility of shared libraries.
Materials Needed:
  • Projector or interactive whiteboard
  • Slides summarising library concepts
  • Sample code files demonstrating static and dynamic linking (C/C++)
  • IDE (e.g., Visual Studio Code) with compiler installed
  • Handout with key comparison table
  • Worksheet with linking scenario questions
Introduction:
Begin with a quick poll: How many students have used a library like stdio.h or java.util in their code? Recall that libraries let us reuse code without rewriting it. Today we will explore how libraries are incorporated into programs and why the choice between static and dynamic linking matters. By the end, you will be able to explain the linking process and evaluate library choices.
Lesson Structure:
  1. Do‑Now (5’) – Students list examples of libraries they have used.
  2. Mini‑lecture (10’) – Define program libraries, types, and file extensions.
  3. Comparison activity (10’) – In pairs, fill a table contrasting static vs dynamic linking (size, memory, updates).
  4. Demonstration (15’) – Show compiling a C program with a static library vs linking to a shared .so, highlighting loader steps.
  5. Guided practice (10’) – Students trace the dynamic linking steps on a provided diagram and answer short questions.
  6. Exit ticket (5’) – Write one advantage and one risk of dynamic linking on a sticky note.
Conclusion:
Summarise the key differences between static and dynamic linking and how versioning impacts compatibility. Ask a few students to share their exit‑ticket responses to reinforce learning. Assign homework to research a real‑world library (e.g., Boost or NumPy) and describe its linking model.