In simple terms
A friendly intro before the formal notes — no formulas yet.
The Vending Machine of Data
An Abstract Data Type is like a blueprint for a data container, focusing on what it does, not how it does it. This separation makes code more organised, reusable, and easier to manage.
Think of a vending machine. You know its interface: you insert coins, press a button, and it dispenses a snack. You don't need to know about the internal motors, spirals, or payment processing systems to use it. The ADT is the vending machine's public interface (the buttons and slots), while the internal mechanics are the underlying data structure.
- 1
Define the 'What': Specify the type of data to be stored and the set of operations that can be performed on it. For example, a 'list' that can have items added and removed.
- 2
Hide the 'How': The internal implementation details are concealed from the user. This principle is called information hiding.
- 3
Provide an Interface: A clear set of public functions or procedures is created for the user to interact with the data, such as AddItem() or RemoveItem().
- 4
Use the ADT: The main program interacts with the data exclusively through this defined interface, making the code independent of the specific implementation.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Full topic notes
Formal explanation with the rigour you need for the exam.
Defining the Abstract Data Type (ADT)
An Abstract Data Type is a theoretical model that defines a set of data values and a set of operations on those values. It specifies what the data represents and what operations can be performed, but completely ignores how this will be achieved in code. Think of it as a contract or a blueprint for a data object. For example, we can define an ADT called List which holds a sequence of items and has operations like addItem, removeItem, and searchItem.
An ADT is a logical description, not a physical one.
It focuses on the interface (operations) and behaviour.
It hides the implementation details from the user/client code.
ADTs vs. Data Structures: The 'What' vs. The 'How'
This is a crucial distinction that often causes confusion. An ADT is the abstract concept, while a data structure is the concrete implementation. For example, the Queue ADT follows a First-In, First-Out (FIFO) principle. To actually build a queue in a program, you need to choose a data structure, such as a static array, a dynamic array, or a linked list. The choice of data structure affects performance and memory usage, but it doesn't change the fundamental behaviour of the queue ADT.
Key Features: Encapsulation and Information Hiding
ADTs are realised in programming languages through features that support encapsulation and information hiding. Encapsulation is the bundling of the data and the operations that work on that data into a single unit, like a class in an object-oriented language. Information Hiding is the practice of restricting access to the internal implementation details of that unit. The data itself is often declared as PRIVATE, and can only be modified or accessed through the PUBLIC interface (the defined procedures and functions). This prevents other parts of the program from accidentally corrupting the data or becoming dependent on a specific implementation.
In exams, when asked to describe an ADT like a stack or queue, focus purely on the abstract properties. Define the data it holds and list the names and purposes of its operations (e.g., PUSH, POP, ENQUEUE, DEQUEUE). Do not mention arrays, pointers, or any specific programming code unless the question explicitly asks for an implementation.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A music streaming service uses a playlist feature. Users can add a song to the end of the playlist, remove the currently playing song from the start, and see which song is next. Describe this playlist feature as an Abstract Data Type, specifying the data and the necessary operations.
- 1
The playlist can be described as a Queue ADT.
A programmer has implemented a data type using a fixed-size array and a top pointer. The interface provides three procedures: Push(item), Pop(), and IsEmpty(). Identify the ADT being implemented and explain how the choice of data structure imposes a limitation.
- 1
Identification: The ADT being implemented is a Stack. [1 mark] The operations Push (adding to the top) and Pop (removing from the top) are characteristic of a Last-In, First-Out (LIFO) structure, which is the definition of a stack. [1 mark]
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
What is an Abstract Data Type (ADT)?
A logical description of how data is viewed and the operations that can be performed on it, without regard to how it will be implemented. It's a model or a blueprint.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
An ADT is a logical description, not a physical one.
- ✓
It focuses on the interface (operations) and behaviour.
- ✓
It hides the implementation details from the user/client code.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Test Your Knowledge on ADTs
Test Your Knowledge on ADTs
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Test Your Knowledge on ADTs on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.