Object-Oriented Programming

IB Syllabus: B3.1 – OOP for a single class (SL+HL), B3.2 – OOP for multiple classes (HL only)

Object-oriented programming is a way of organising code around objects – self-contained units that combine data and the operations that act on that data. Instead of writing one long program with variables scattered everywhere, you model the problem as interacting objects, each responsible for its own state and behaviour.

This matters because real-world systems are complex. A school has students, teachers, courses, and grades. A hospital has patients, doctors, appointments, and records. OOP lets you model each of these as a separate class, keep their data private, and define clear interfaces for how they interact.


SL Core (B3.1)

Page Covers
What is OOP? Procedural vs OOP, four principles, key terminology
Classes and Objects Class definition, attributes, methods, instantiation, arrays of objects
Constructors Default, parameterised, overloaded constructors
The this Keyword Parameter shadowing, when this is required
Encapsulation Private fields, getters/setters, validation, data hiding
Access Modifiers private, public, protected, which to use when
Static Members Static vs instance, shared counters, why main is static
Object References Aliasing, null, == vs .equals()
UML Class Diagrams Three-section box, access modifier symbols, relationships
Aggregation Has-a relationship, objects as attributes, delegation

HL (B3.2)

Page Covers
Inheritance extends, super(), constructor chaining, is-a
Method Overriding (coming soon) @Override, replacing parent behaviour
Polymorphism (coming soon) Polymorphic arrays, runtime method dispatch
Abstract Classes (coming soon) abstract keyword, forcing subclass implementation
Interfaces (coming soon) interface, implements, contracts
Composition vs Inheritance (coming soon) Design decisions, tight coupling

Exam Skills

Page Covers
OOP Method Patterns (coming soon) Filter, accumulate, find-by-ID, null checks
Selection Sort on Objects (coming soon) Sorting by attribute, .compareTo()
OOP Terminology Reference (coming soon) Every IB term with mark scheme definitions

IA Preparation

Page Covers
JavaFX Basics (coming soon) Stage, Scene, FXML, event handlers
MVC Architecture (coming soon) Model-View-Controller pattern
FXML and Controllers (coming soon) .fxml files, FXMLLoader, @FXML binding
Multi-Window Apps (coming soon) Stage management, Singleton, data sharing
File I/O in Apps (coming soon) Persistence, CSV, load/save patterns
Structuring Your IA (coming soon) Planning classes, examiner expectations

Table of contents


Back to top

© EduCS.me — A resource hub for IB Computer Science

This site uses Just the Docs, a documentation theme for Jekyll.