B3 Object oriented programming
For the new IB Diploma Computer Science syllabus to start teaching in August 2025, and for first examinations in May 2027.
Unit and lesson overviews will be gradually published as developed.
- Lesson 1: Introducing OOP
- Lesson 2: Designing classes
- Lesson 3: Instantiating objects
- Lesson 4: Encapsulation
- Lesson 5: Statics & non-statics
- Lesson 6,7,8: Programming scenarios
- Lesson 9: Inheritance (HL)
- Lesson 10: Polymorphism (overriding) (HL)
- Lesson 11: Abstract classes (HL)
- Lesson 12: Composition & aggregation (HL)
- Lesson 13: Design patterns (HL)
- Lesson 14,15,16,17: Programming scenarios (HL)
- Lesson 18,19: Exam style questions
- Lesson 20: Assessment
Lesson 1: Introducing OOP
B3.1.1 Evaluate the fundamentals of OOP.
- Model real-world entities using OOP concepts: classes, objects, inheritance, encapsulation, polymorphism
- The advantages and disadvantages of using OOP in various programming scenarios
Lesson 2: Designing classes
B3.1.2 Construct a design of classes, their methods and behaviour.
- Classes and their methods, based on application requirements
- The use of unified modelling language (UML) class diagrams to represent class relationships, attributes and methods, to aid effective software design and planning
Lesson 3: Instantiating objects
B3.1.4 Construct code to define classes and instantiate objects.
- How to define classes and create objects from those classes
- The role of constructors in initializing an object’s state, setting initial values for its attributes to define its condition or characteristics at the time of creation
Lesson 4: Encapsulation
B3.1.5 Explain and apply the concepts of encapsulation and information hiding in OOP.
- The principles of encapsulation and information hiding
- Apply access modifiers such as private and public
- Controlling access to class members
- The importance of limiting access to maintain the integrity and security of an object’s state
Lesson 5: Statics & non-statics
B3.1.3 Distinguish between static and non-static variables and methods.
- The differences between static and non-static variables and methods, including their usage and scope
- When to use instance variables instead of class variables, and how to apply these concepts effectively in code
Lesson 6,7,8: Programming scenarios
Lesson 9: Inheritance (HL)
B3.2.1 Explain and apply the concept of inheritance in OOP to promote code reusability.
- How inheritance enables a hierarchical relationship between parent and child classes
- Extending existing classes, utilizing inheritance to reuse and extend functionalities
- The impact of inheritance on access to parent class members with different access modifiers (private, public, protected, default)
Lesson 10: Polymorphism (overriding) (HL)
B3.2.2 Construct code to model polymorphism and its various forms, such as method overriding.
- The principle of polymorphism and how it contributes to code flexibility and reusability
- How to implement dynamic polymorphic behaviour through mechanisms like method overriding
- How to apply static polymorphic behaviour to maximize code efficiency
Lesson 11: Abstract classes (HL)
B3.2.3 Explain the concept of abstraction in OOP.
- The significance of abstraction in the development of modular code fragments
- The use of abstract classes to establish common interfaces for sub-classes
Lesson 12: Composition & aggregation (HL)
B3.2.4 Explain the role of composition and aggregation in class relationships.
- How to design objects by leveraging smaller component objects through composition and aggregation
- That aggregation implies that the subcomponents can function independently of the aggregating class, while in composition, the subcomponents are tightly coupled and cannot exist outside the aggregating class
Lesson 13: Design patterns (HL)
B3.2.5 Explain commonly used design patterns in OOP.
- The key design patterns such as singleton, factory and observer
- The application of design patterns in solving recurring programming challenges