Practice Questions
IB DP Computer Science B.4: Abstract Data Types – Practice Questions
Original warm-up questions with answers for IB DP Computer Science B.4 Abstract data types (HL only): ADT ideas, abstraction and what the 2027 brief says.
- Subject
- Computer Science
- Level
- IB
- Topic
- B.4 – Abstract data types (HL only)
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to International Baccalaureate IB Diploma Programme Computer Science (DP Computer Science), First assessment 2027. Official subject brief .
Syllabus page (what it covers and how it is assessed): IB Diploma Programme Computer Science.
Found an error? Report a correction.
Need help with this topic? Request a free trial class for IB Diploma Programme Computer Science (DP Computer Science (2014) / DP Computer Science (2027)).
These are original questions written for Marlbridge, for revision and practice on this content. They are not reproduced past-paper questions, and they do not replicate the exam’s exact structure, question count or mark tariffs – the IB holds copyright in its own papers. Use these alongside the official past papers available through your school or the IB store.
Related: B.4 Abstract data types study guide and revision notes.
B.4 is HL only. The IB’s public subject brief for the 2027 course does not list which abstract data types B.4 covers; that is in the full DP guide. Section A checks what the brief says. Section B contains general warm-up questions on the idea of an abstract data type, not mapped to specific IB outcomes, to use while you work through the full guide.
Section A: the course and assessment
1. State the level at which B.4 is studied and its recommended teaching hours. [2]
2. Describe how B.4 is assessed. [2]
Section B: general ADT warm-ups
3. Explain what is meant by an abstract data type. [2]
4. Explain how an abstract data type is an example of abstraction. [2]
5. A programmer designs an ADT called Counter with the operations reset() (sets the value to 0), increment() (adds 1) and getValue() (returns the value). Starting from a new Counter after reset(), the operations increment(), increment(), reset(), increment() are carried out. State the value returned by getValue(). [1]
6. Give one advantage of separating an ADT’s operations from its implementation. [2]
Answers
1. HL only [1]; 23 hours at HL (0 at SL) [1].
2. On Paper 2 [1], through additional questions for HL focused on OOP and abstract data types [1].
3. A data type defined by the values it can hold and the operations that can be performed on it [1], independently of how it is implemented [1].
4. The user of the ADT works only with what it does (its operations) [1], and the detail of how the data is stored is hidden or ignored, which is abstraction: keeping only the detail needed [1].
5. After reset 0; increment 1; increment 2; reset 0; increment 1. getValue() returns 1 [1].
6. The implementation can be changed or improved without changing the programs that use the ADT [1], because they only use its operations; it also lets programmers use the ADT without knowing its internal details [1].
Where marks are usually lost
- Defining an ADT by one particular implementation.
- Losing track of state when tracing a sequence of operations; write the value after every step.
Frequently asked questions
Why are some questions labelled general? The public subject brief does not list the B.4 data types, so general warm-ups are used until you check the full guide’s outcomes.
Do SL students need these questions? No. B.4 is HL only.
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.
Related resources
-
Study guides
IB Diploma Programme Computer Science: Syllabus Guide
Full syllabus map for IB DP Computer Science, first assessment 2027: Theme A and Theme B sub-topics, the case study and recommended teaching hours at SL and HL.
Computer Science · International Baccalaureate · IB
Read guide -
Revision notes
IB DP Computer Science B.4: Abstract Data Types – Revision Notes
Revision notes on IB DP Computer Science B.4 Abstract data types (HL only): what the 2027 subject brief says on hours, HL Paper 2 questions and how to revise.
Computer Science · International Baccalaureate · IB
Revise topic -
Study guides
IB DP Computer Science B.4: Abstract Data Types (HL)
Overview study guide to B.4 Abstract data types, the HL-only IB DP Computer Science sub-topic (first assessment 2027): 23 HL hours and Paper 2 HL questions.
Computer Science · International Baccalaureate · IB
Read guide
Related articles
-
teaching
A Level tuition in Dubai: Cambridge or Pearson Edexcel International A Level?
Schools in Dubai and Abu Dhabi teach either Cambridge International AS & A Level or Pearson Edexcel International A Level. How the two are structured, why it matters for tuition, and how online classes from Lahore work.
9 October 2026
-
curriculum guides
Choosing subjects at IGCSE and A Level
How subject choices at 14 and 16 affect university options later, and how to keep pathways open without overloading a timetable.
28 July 2026
Studying this with a teacher
Working through Computer Science IB?
This page is free and stays free. If you would rather be taught it, Marlbridge runs Computer Science classes one-to-one, online in your own time zone. The first trial class is free. WhatsApp replies within an hour (8am–11pm Pakistan time, every day); email the same day.
IB Computer Science teachers at Marlbridge