IB DP · Exam Tips

Computer Science Exam Tips

Master IB Diploma Programme Computer Science with this expert examiner guide. Grounded in official assessments, this guide breaks down Paper 1 algorithm tracing, Paper 2 Option D OOP encapsulation, and UML class diagram modelling, providing actionable strategies to avoid common traps and secure maximum marks.

5 min readUpdated: Jun 21, 2026

Exam at a Glance

Papers
3
Total Marks
195
Time Limit
4h 30min
Question Types
3
PaperDurationMarksQuestionsWeightingQuestion Types
Paper 12h 10min100
Paper 21h 20min65
Paper 31h30
Grade Scale
7654321
Calculator Policy

A graphic display calculator (GDC) from the IB-approved list is required for most Mathematics and Sciences papers and must be set to examination mode. Note that some papers do not permit a calculator (for example Mathematics Paper 1 and the multiple-choice Sciences Paper 1).

  • AO1: Know and understand relevant facts, concepts, and terminology (35%)
  • AO2: Apply and use computer science concepts, theories, and techniques (40%)
  • AO3: Evaluate, design, and construct computer systems, designs, and algorithms (25%)

Built from real past papers and marking schemes (2023–2025).

Tips & Strategies

The 5-Minute Habit That Saves a Grade on Trace Tables and Recursion

In IB Computer Science, a single misplaced index can cascade into a complete loss of marks on algorithm tracing. Examiners consistently report that top-performing students succeed not because of faster mental processing, but because of rigorous, systematic scratch-pad tracing. Whether you are dealing with a standard loop structure in Paper 1 or a recursive method in Paper 2 Option D, you must document every intermediate state.

When encountering trace table questions (such as Paper 1's array tracing), do not try to evaluate the entire loop in your head. Create a structured table containing columns for the loop counter, any array index pointers, and the state of the array itself. For example, during a loop execution like:
K = K + 1
NUM[K] = NUM[K-1] + NUM[K]
you must document the value of K, the index arithmetic, and the exact array modification in chronological order. Write out each state clearly, row by row.

This habit is even more critical when tracing recursive functions. For any recursive call, such as:
return arr[k][n] + aMethod(arr, k, n+1);
never omit intermediate execution states. Top scorers explicitly sketch out the call stack frame-by-row, like this:

Call Stack LevelActive ParametersReturn Expression (Unresolved)
Frame 1k=4, n=0arr[4][0] + aMethod(arr, 4, 1)
Frame 2k=4, n=1arr[4][1] + aMethod(arr, 4, 2)
Frame 3k=4, n=2arr[4][2] + aMethod(arr, 4, 3)
Frame 4 (Base Case)k=4, n=31 (Concrete Return Value)

By writing down this clear substitution working, you secure partial working-out marks even if you make a simple calculation error at the final summation stage.

The "Double getNext()" Trap and Collection Iteration

One of the most frequent logical traps in Paper 1 Section B involves standard collection traversal. When asked to construct an algorithm that iterates through a Collection (e.g., PLTNT), candidates frequently write code that invokes the getNext() method multiple times in a single loop body. For instance:

while PLTNT.hasNext()
  X = PLTNT.getNext()
  output(PLTNT.getNext())
end loop

This code contains a fatal logical error. Every call to .getNext() advances the internal pointer of the collection. Calling it twice inside the loop body causes the algorithm to skip every second element. Furthermore, if the collection contains an odd number of elements, the second .getNext() call on the final iteration will point to a null element, crashing the program with a runtime exception.

The Golden Rule: Call .getNext() exactly once per loop iteration, store the returned object in a temporary variable, and then perform all subsequent comparisons, updates, and outputs using that temporary variable.

The OOP Encapsulation Shield: Protecting Your Coding Marks

In Paper 2 Option D (Object-Oriented Programming), candidates are regularly penalization for violating the core principle of encapsulation. When writing client code or class manager methods (such as displayLawyerNames() or countDelayedCases()), you must never access the private properties of another class directly. For example, if class Lawyer has a private attribute lawyerType, writing:
if(allLawyers[i].lawyerType.equals("civil"))
will immediately cost you the syntax and design marks.

Instead, look closely at the provided class definitions in the exam paper and identify the public accessor method. You must invoke the getter method:
if(allLawyers[i].getLawyerType().equals("civil")).

Additionally, when iterating through arrays of objects, you must protect your code against runtime crashes. In practical systems, arrays (such as lawyerCases[15]) are often only partially filled. Attempting to invoke a method on an array index that does not contain an instantiated object will result in a NullPointerException. Always implement a null-pointer sentinel check before accessing any index properties:

if (lawyerCases[j] != null) { ... }

Mastering UML Class Diagrams: Arrows and Access Modifiers

In Paper 2 OOP, drawing class diagrams is a reliable source of marks if you use the precise notations expected by IB examiners. The two most common relationships tested are Inheritance (is-a) and Aggregation/Composition (has-a).
When representing inheritance (e.g., TraineeLawyer inheriting from Lawyer), the arrow must have an open, hollow triangle arrowhead pointing directly to the superclass (parent class). Drawing a standard solid arrowhead or pointing the arrow in reverse (from parent to child) represents an incorrect relationship and yields zero marks.

Furthermore, each class box must be divided into three distinct sections: Class Name, Attributes, and Methods. Every single attribute and method must be prefixed with the correct access modifier symbol: minus (-) for private and plus (+) for public. Leaving these symbols out will cost you technical accuracy marks.

Command Words: Decoding the Examiner's Intent

IB Computer Science examiners use specific command words to signal the depth of analysis required in your response:

  • Explain: You must identify a specific system component or concept, and then trace its direct, step-by-step impact on the scenario. For instance, explaining how a VPN works requires detailing the creation of a secure tunnel, data packet encapsulation, and transport-layer encryption protocols.
  • Compare and Contrast: A high-scoring response must address both similarities and differences. If asked to compare local storage and cloud storage in terms of cost, security, and accessibility, you must provide a balanced, side-by-side analysis using comparative link words (e.g., "while local storage requires high initial capital expenditure for hardware, cloud storage models shift to an operational pay-as-you-go model").
  • Evaluate / Discuss: These extended response prompts require you to outline the advantages, the disadvantages, and provide a reasoned, justified conclusion. Structure your response with distinct paragraph breaks for pros and cons, and conclude with a definitive summary that balances both sides.

Calculator Programs

Graph: zeros, intersections & turning points

Graphical calculator / GDC (exam mode)

Purpose: Plot a function to read its roots (zeros), points of intersection, and maxima/minima.

When to use it: Checking solutions, sketching, or solving where an analytic method is hard.

Steps
Graph the function(s) and use the built-in zero, intersect and maximum/minimum tools.

Exam note: Use a GDC from the IB-approved list in examination mode. Some papers do not permit a calculator. Always show your reasoning.

Numerical equation solver

Graphical calculator / GDC (exam mode)

Purpose: Solve an equation or find a variable numerically when an algebraic route is long or implicit.

When to use it: Iterative or implicit equations, or to confirm an algebraic solution.

Steps
Use the equation/zero solver, entering the equation and a sensible starting estimate.

Exam note: Use a GDC from the IB-approved list in examination mode. Some papers do not permit a calculator. Always show your reasoning.

Numerical integration & differentiation

Graphical calculator / GDC (exam mode)

Purpose: Evaluate a definite integral \(\int_a^b f(x)\,dx\) or a gradient \(f'(x)\) at a point.

When to use it: Checking calculus answers, or where only a numerical value is needed.

Steps
Use the GDC's numeric integral / derivative function with the limits or the point.

Exam note: Use a GDC from the IB-approved list in examination mode. Some papers do not permit a calculator. Always show your reasoning.

Statistics & probability distributions

Graphical calculator / GDC (exam mode)

Purpose: 1-var/2-var statistics, linear regression, and cumulative binomial / normal / Poisson probabilities without tables.

When to use it: Statistics questions and hypothesis tests.

Steps
Enter data in the statistics editor, or use the distribution menu (binomial cdf, normal cdf, …).

Exam note: Use a GDC from the IB-approved list in examination mode. Some papers do not permit a calculator. Always show your reasoning.

Common Mistakes

  1. 1highMarks at stake: 2Computational thinking

    Calling getNext() multiple times within a single iteration loop when traversing collections.

    How to avoid it: Call getNext() exactly once per iteration, store the returned object in a temporary variable, and perform all subsequent logical comparisons and operations on that variable.
  2. 2highMarks at stake: 4Object-oriented programming (OOP)

    Accessing attributes or calling methods on array objects without executing a null pointer sentinel check, leading to runtime NullPointerExceptions.

    How to avoid it: Implement an explicit check 'if (array[i] != null)' to ensure the index actually holds an instantiated object reference before performing any operations on it.
  3. 3highMarks at stake: 3Object-oriented programming (OOP)

    Violating encapsulation by accessing private object properties directly across class boundaries instead of using defined public accessor methods (getters).

    How to avoid it: Always invoke public getter methods (e.g., s.getArtworkPrice()) when accessing attributes from foreign class scopes.
  4. 4mediumMarks at stake: 3Computational thinking

    Failing to update all parallel arrays simultaneously during sorting algorithms, resulting in desynchronized and corrupted relational data.

    How to avoid it: Construct swap operations using temporary storage variables that swap elements across all associated parallel arrays at the exact same index.
  5. 5mediumMarks at stake: 6System fundamentals

    Providing one-sided, feature-list descriptions for 'compare and contrast' or 'evaluate' command words, rather than structured, balanced comparative analyses.

    How to avoid it: Use explicit comparative syntax ('whereas', 'unlike') and ensure you analyze both similarities/differences or advantages/disadvantages before writing a reasoned conclusion.

Turn these tips into top grades

thinka turns your weak spots into targeted practice, with instant marking and exam-style feedback. Study smarter, not longer.

Practise real exam questions with instant AI feedback and marking.

Start Practising Free