Programming Layer
Theme B - Computational Thinking & Problem-Solving (B2, B3)
Programming is the layer where abstract ideas become concrete: a loop carries out iteration, an array is a block of contiguous memory, and an object models something real.
This layer uses code as a vehicle for understanding how computers process information, how algorithms work, and how to think computationally. Every example is written in both Java and Python (the two IB CS languages): use the tabs on any code block to pick yours, and the site remembers the choice. The aim is to use a language to reason about problems.
Interactive quizzes are graded against the Java versions. When you are viewing Python, questions that test a Java-specific detail carry a small Java label, so you always know which language option a question belongs to.
Sections in this layer
The sections follow a teaching order: the foundation first (Fundamentals to File Processing), then Object-Oriented Programming, then the HL data structures built from scratch.
| # | Topic | Syllabus | Key Concepts | Level |
|---|---|---|---|---|
| 1 | Programming Fundamentals | B2.1 | Variables, data types, strings, exceptions, debugging | SL + HL |
| 2 | Programming Constructs | B2.3 | Sequence, selection, loops, functions, scope | SL + HL |
| 3 | Data Structures | B2.2 | Arrays, ArrayList, stacks (LIFO), queues (FIFO) | SL + HL |
| 4 | Algorithms | B2.4 | Big O, linear/binary search, bubble/selection sort; HL: recursion, quicksort | SL + HL |
| 5 | File Processing | B2.5 | Reading, writing, appending files | SL + HL |
| 6 | Object-Oriented Programming | B3.1, B3.2 (HL) | Classes, objects, encapsulation, UML design; HL: inheritance, polymorphism, abstraction, composition | SL + HL |
| 7 | Abstract Data Types | B4.1 | Linked lists, BSTs, sets, hash maps | HL |
| 8 | JavaFX Cookbook | Recipes for building a desktop app with JavaFX and MVC, for example for the IA (beyond the syllabus) | ||
| 9 | Software Development | Requirements, design, testing, documentation and usable interfaces |
How to Use This Layer
- Start with Programming Fundamentals if you are new to programming or need a refresher on data types and operators.
- Work through Programming Constructs to master
if/else, loops, and methods - these appear in every program. - Data Structures and Algorithms are closely related - understanding how data is stored shapes which algorithms make sense.
- File Processing connects your programs to the real world: data persists beyond a single run.
IB Paper 2 questions require you to trace code, identify errors, and write short algorithms. The trace table exercises in each section prepare you directly for this.