IB Computer - Abstract Data Types

5.0(1)
studied byStudied by 21 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/27

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

28 Terms

1
New cards

Abstraction

A model of a system that includes only necessary details for the user, hiding the complexity of the actual implementation.

2
New cards

Abstract Data Type (ADT)

Provides a collection of data and operations that act on the data, allowing usage without knowledge of implementation details.

3
New cards

List ADT

Represents a collection of data with defined operations like insert, remove, clear, contains, indexOf, get, size, and toString.

4
New cards

Stack ADT

Structures where elements are added and removed from the same end, following Last In First Out (LIFO) principle.

5
New cards

Queue ADT

Structures where elements are added to one end and removed from the other, following First In First Out (FIFO) principle.

6
New cards

Set ADT

Represents a collection of unique elements with operations like add, remove, contains, union, intersection, difference, size, isEmpty, and clear.

7
New cards

Map/Dictionary ADT

Represents key-value pairs with operations like put, get, remove, containsKey, containsValue, keySet, values, entrySet, size, isEmpty, and clear.

8
New cards

Features of ADT

Key features include Abstraction, Better Conceptualization, Robustness, Encapsulation, Data Abstraction, Data Structure Independence, Information Hiding, and Modularity.

9
New cards

Advantages of ADT

Encapsulation, Abstraction, Data Structure Independence, Information Hiding, and Modularity provide benefits in managing and working with data structures.

10
New cards

Disadvantages of ADT

Overhead, Complexity, Learning Curve, Limited Flexibility, and Cost are challenges associated with implementing and using ADTs.

11
New cards

Information Hiding

The complexity and details of actual implementation should be hidden from the user informal

12
New cards

Information Specification

An English description that provides a list of all available operations on the data with their inputs and outputs

13
New cards

Formal Specification

A Java interface definition that concrete classes can implement later.

14
New cards

StringList

Contains a (possibly empty) collection of objects of type String.

15
New cards

Insert

This operation adds a String object, given as a parameter, to the list of strings.

16
New cards

Remove

This operation removes a String object, given as a parameter, from the list of strings. If the given String object is not on the list, the list content does not change.

17
New cards

Clear

This operation removes all objects from the list. The list becomes empty.

18
New cards

Contains

This operation determines whether a String object, given as a parameter, is stored in the list. It returns true or false, accordingly.

19
New cards

IndexOf

This operation determines the index (or location) of a String object, given as a parameter.

20
New cards

Get

This operation returns an object stored at the index/location given as a parameter.

21
New cards

Size

This operation determines the number of objects stored in the list.

22
New cards

toString

This operation produces a meaningful String representation of the list.

23
New cards

CharStack

Contains a (possibly empty) collection of objects of type Character.

24
New cards

Insert/Push

This operation adds a Character object, given as a parameter, to the top of the stack of characters.

25
New cards

Remove/Pop

This operation removes and returns a Character object from the top of the stack of characters.

26
New cards

Peek

This operation returns a Character object from the top of the stack of characters.

27
New cards

Insert/Enqueue

This operation adds a Process object, given as a parameter, to the end of the queue of processes.

28
New cards

Remove/Dequeue

This operation removes and returns a Process object from the front of the queue of processes.