Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Define and use composite data types
Learning Objective/s:
  • Describe what composite (user‑defined) data types are and give examples.
  • Explain how to declare and instantiate records, arrays, tuples, and classes in at least two programming languages.
  • Apply appropriate composite types to model real‑world entities and perform basic operations such as access, assignment, and passing.
  • Analyze memory and performance considerations when using composite types.
Materials Needed:
  • Projector or interactive whiteboard
  • Laptop with IDE (C/C++, Java, Python)
  • Printed handout of syntax tables for records, arrays, tuples, and classes
  • Sample code snippets on USB or shared drive
  • Whiteboard and markers
Introduction:

Begin with a quick recall question about primitive data types to activate prior knowledge. Explain that today’s focus is on building richer data structures that mirror real‑world objects. Outline the success criteria: students will be able to define, instantiate, and manipulate at least three different composite types.

Lesson Structure:
  1. Do‑Now (5') – Short quiz on primitive types and their limitations.
  2. Mini‑lecture (10') – Define composite data types; show syntax for records, arrays, tuples, and classes in C/C++ and Python.
  3. Guided coding (15') – In pairs, write a struct/record and create an array of that record; teacher circulates to support.
  4. Interactive demo (10') – Demonstrate passing a record by reference vs. by value and discuss memory implications.
  5. Practice exercise (10') – Extend the code to include a tuple or class and implement a simple method (e.g., calculate average GPA); peer review.
  6. Check for understanding (5') – Exit ticket: write one advantage of using a class over a struct.
Conclusion:

Recap the key ideas: composite types let us model complex data, choice of type affects memory and readability, and passing by reference can improve performance. Collect the exit tickets to gauge understanding, and assign homework to create a small program that uses a class to manage a collection of objects and includes a method that processes the collection.