Skip to content
Computer Science · Grade 11

Active learning ideas

Introduction to Object-Oriented Programming (OOP)

Active learning works for this topic because OOP concepts like classes and objects are abstract until students manipulate them directly. Hands-on creation of code artifacts solidifies the relationship between blueprints (classes) and instances (objects) in a way passive listening cannot. When students write, test, and debug their own classes, they confront misconceptions immediately through visible errors and real outcomes.

Ontario Curriculum ExpectationsCS.HS.P.1CS.HS.P.2
20–45 minPairs → Whole Class4 activities

Activity 01

Concept Mapping30 min · Pairs

Pair Programming: Bank Account Class

Pairs create a BankAccount class with attributes for balance and account number, and methods for deposit and withdraw. They test with sample transactions, handling invalid inputs. Pairs then exchange code to debug and suggest improvements.

Explain the benefits of an object-oriented approach over procedural programming.

Facilitation TipDuring Pair Programming: Bank Account Class, circulate with a checklist that flags common errors like using global variables instead of instance attributes.

What to look forPresent students with a scenario, such as a 'Book' in a library. Ask them to list 3 attributes (e.g., title, author, ISBN) and 2 methods (e.g., 'borrow', 'return') for a Book class. Then, ask them to create one specific 'Book' object with sample values.

UnderstandAnalyzeCreateSelf-AwarenessSelf-Management
Generate Complete Lesson

Activity 02

Concept Mapping45 min · Small Groups

Small Groups: Video Game Character Design

Groups design a Character class with health, strength attributes, and attack method. They instantiate multiple characters and simulate battles by calling methods. Groups present one battle scenario to the class.

Differentiate between a class and an object in software design.

Facilitation TipIn Small Groups: Video Game Character Design, assign each group a unique character type so students see how the same class can produce varied objects.

What to look forFacilitate a class discussion using the prompt: 'Imagine you are designing software for a school. What are some real-world entities you would model as classes? For one of these classes, identify its key attributes and behaviors, and explain why an object-oriented approach is beneficial here compared to a procedural one.'

UnderstandAnalyzeCreateSelf-AwarenessSelf-Management
Generate Complete Lesson

Activity 03

Concept Mapping40 min · Whole Class

Whole Class: Shape Class Challenge

As a class, code a base Shape class with area method, then extend to Circle and Rectangle subclasses. Volunteers demonstrate polymorphism by calling area on different objects. Discuss outputs together.

Construct a simple class to represent a real-world entity, identifying its attributes and behaviors.

Facilitation TipFor the Whole Class: Shape Class Challenge, project live code edits on the board to model debugging strategies and normalize the process.

What to look forProvide students with a simple Python code snippet defining a class (e.g., a 'Dog' class with 'name' and 'breed' attributes). Ask them to write down: 1. What is the name of the class? 2. What are the attributes defined? 3. Write one line of code to create an object (instance) of this class.

UnderstandAnalyzeCreateSelf-AwarenessSelf-Management
Generate Complete Lesson

Activity 04

Concept Mapping20 min · Individual

Individual: Real-World Entity Extension

Students choose a real-world item like a LibraryBook, add attributes and behaviors to an existing class template, and write three test cases. They self-assess using a rubric on encapsulation.

Explain the benefits of an object-oriented approach over procedural programming.

Facilitation TipDuring Individual: Real-World Entity Extension, provide a template with comments that scaffold the transition from real-world descriptions to class definitions.

What to look forPresent students with a scenario, such as a 'Book' in a library. Ask them to list 3 attributes (e.g., title, author, ISBN) and 2 methods (e.g., 'borrow', 'return') for a Book class. Then, ask them to create one specific 'Book' object with sample values.

UnderstandAnalyzeCreateSelf-AwarenessSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teach OOP by starting with concrete examples students already know, such as shapes or pets, before abstracting to code. Use analogies carefully, as metaphors like ‘blueprints’ can reinforce the class-object confusion if not explicitly contrasted with actual code. Prioritize frequent, low-stakes creation of classes and objects over lengthy lectures, because constructing instances reveals gaps in understanding faster than verbal explanations. Research shows that interleaving procedural and object-oriented tasks improves retention, so alternate between writing standalone functions and class methods to highlight their differences.

Successful learning looks like students confidently defining classes with attributes and methods, creating multiple objects from one class, and explaining why they chose certain properties or behaviors. They should articulate the difference between a class and an object without prompting and recognize how methods operate on object-specific data. Collaboration should reveal shared understanding through peer explanations and code reviews.


Watch Out for These Misconceptions

  • During Pair Programming: Bank Account Class, watch for students using the class name to call methods instead of creating an object first.

    Pause the pair and ask them to trace through the code step-by-step, highlighting where the class ends and the object begins. Have them insert print statements to show the object’s balance after each method call, making the instance’s data visible.

  • During Small Groups: Video Game Character Design, watch for students treating methods as functions that exist outside the class.

    Assign each group to present their class definition and one object creation line. During presentations, ask other groups to identify how the method accesses the object’s data via ‘self’, and correct any attempts to use global variables.

  • During Whole Class: Shape Class Challenge, watch for students assuming methods like ‘area’ belong to the class rather than the object.

    After the challenge, run a live demo where you create two Rectangle objects with different dimensions. Call the ‘area’ method on each and compare outputs, explicitly naming that the method uses the object’s ‘width’ and ‘height’ attributes.


Methods used in this brief