Unit bundle · Written for OCR A Level (H446)

Object-Oriented Programming – OCR A Level Computer Science lessons (H446)

Thirteen Year 12 lessons on object-oriented programming: classes, objects, encapsulation, inheritance, polymorphism and class diagrams.

Also in a bundle Year 12 A Level Computer Science – a full year of OCR H446 lessons 165 lessons for £199 · save 69% on buying separately

Students compare programming paradigms and then build object-oriented programs: classes, constructors, attributes and methods, encapsulation, inheritance and polymorphism, in Python and OCR pseudocode. Every lesson codes part of one system for Fernhollow Wildlife Park, a fictional park with animal records and online ticketing, because examiners report that students without hands-on OOP lose the most marks.

Unit 12.6 is taught in Year 12, Spring 1, and answers one big question: Why do large programs model the world as objects?

What happens in each lesson:

Lesson 1, Programming paradigms: Why are there different ways to write a program? Main task: explain two characteristics of a procedural language and two characteristics of an object-oriented language, giving the benefit of each for Fernhollow Wildlife Park's ticketing app (6 marks).

Lesson 2, Classes and objects: How does one class describe many animals? Main task: write a program that uses Fernhollow's given Animal class to create three Animal objects and output each one's name and enclosure, then explain why changing one object's enclosure does not change the others (6 marks).

Lesson 3, Constructors and instantiation: What happens at the moment an object is created? Main task: write the constructor for Fernhollow's Ticket class so that it sets the ticket type and price from parameters and the number of scans to 0, then instantiate an adult ticket costing £18.50 (6 marks).

Lesson 4, Attributes and methods: What does an object know, and what can it do? Main task: write two methods for Fernhollow's Animal class: feed(grams), which adds to the food given today, and dailyReport(), which returns a sentence with the animal's name and total food (6 marks).

Lesson 5, Encapsulation: private attributes, getters and setters: Why should other code not change an object's data directly? Main task: write Fernhollow's Ticket class with a private price attribute, a public getter, and a public setter that rejects a price below 0 or above 100, then explain how encapsulation protects the park's ticket data (7 marks).

Lesson 6, Inheritance: How can new classes reuse what one class already does? Main task: write a class Bird that inherits from Fernhollow's Animal class, adds a wingspan attribute and calls the superclass constructor, then instantiate an owl (6 marks).

Lesson 7, Polymorphism and overriding: How can one method call behave differently for each object? Main task: write an overriding describe() method in Fernhollow's Bird and Reptile classes, and a loop that calls describe() on every animal in a list, then explain why this is polymorphism (6 marks).

Lesson 8, OOP in OCR pseudocode: How do we write and read OOP in OCR pseudocode? Main task: write, in OCR pseudocode, a class MemberTicket that inherits from Fernhollow's Ticket class, adds a private memberNumber attribute, calls super.new in its constructor and has a public getter (7 marks).

Lesson 9, Class diagrams: How can we plan a system of classes before writing code? Main task: draw a class diagram for Fernhollow's Animal, Bird and Keeper classes, showing attributes, methods, + and − access, the inheritance between Bird and Animal and the association between Keeper and Animal (6 marks).

Lesson 10, OOP practice: a Section B scenario: How do we answer an OOP question set in a scenario? Main task: complete the Section B question on Fernhollow's adoption scheme: write the Adoption class constructor, write a getter, instantiate an adoption, and explain one benefit of encapsulation for this system (12 marks).

Lesson 11, OOP project: building a small system 1: How do we turn a design into a working set of classes? Main task: write the first version of Fernhollow's booking system: a Ticket class and a Booking class whose addTicket() method stores Ticket objects in a list and whose total() method iterates over them to return the cost (8 marks).

Lesson 12, OOP project: building a small system 2: How do we refine a working system to make it better? Main task: write ConcessionTicket and FamilyTicket subclasses that override getPrice() for Fernhollow's booking system, make every attribute private with validated setters, and test the booking total with normal, boundary and invalid data (8 marks).

Lesson 13, Progress Check: 36 multiple-choice questions (homework or the start of the lesson) + a 40-mark written paper in the lesson (45 minutes)

Misconceptions it tackles include
“Procedural languages are low level”; “A class and an object are the same thing”; “The class declaration is the constructor”. Each is planned into a hinge question before the main task or an exit question, so you find out who still holds it.
OCR H446 specification coverage
1.2.4 (a), (b), (e), types of programming language: why different programming paradigms exist and their characteristics; procedural languages; object-oriented languages – classes, objects, methods, attributes, inheritance, encapsulation and polymorphism; 2.2.1 (f), programming techniques: using object-oriented techniques when writing programs.

It builds on 12.2 Programming Foundations (subroutines, parameters, local and global variables, arrays and the IDE) and 12.5 Systems Software and Translators (high-level and low-level languages, compilers, interpreters and assemblers). It leads on to 12.7 Assembly Language (the low-level paradigm in practice), 12.8 Data Structures (stacks, queues, linked lists and trees coded as classes), 12.12 and the programming project (OOP is one of the A Level features moderators look for), and Paper 2 Section B, which sets OOP code every year.

Adapting it for your school
Lessons 11 and 12 are the flex lessons: if time is short, set the booking system as homework and keep lesson 10. Fernhollow Wildlife Park is fictional. Swap it for any organisation your students know; every Build keeps its structure. Lessons 2–7 and 10–12 assume a Python IDE; each has a paper version in OCR pseudocode. Python has no enforced private attributes: teach the double underscore and the OCR keyword private side by side.

An independent resource written for OCR A Level Computer Science (H446). It is not endorsed by OCR or Cambridge University Press & Assessment. Programming project (NEA) lessons teach general skills on a made-up example project and give supervised time, within JCQ's rules on the help a centre may give.

What's included

  • 13 lesson slide decks (PowerPoint)
  • 13 lesson plans (Word)
  • 13 worksheets, plus 12 support versions with scaffolds (Word)
  • 1 exam-style paper with mark scheme (Word)
  • Medium term plan with intent, key words, misconceptions and adaptive teaching notes (Word)
  • Progress Check lesson to assess the unit
  • OOP project - building a small system 2 - Quiz Quiz Trade Cards
  • Department licence: every teacher in your department can use and adapt it

In this bundle

Worth £52 bought separately at £4 a lesson. The bundle saves you 13%.

More for A Level Computer Science

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.