Saxony Abitur Informatics - independent foundations study materials
Saxony Abitur Informatics - independent foundations study resources

Saxony Abitur Informatics - independent foundations practice questions

One question at a time. Build your Saxony Abitur Informatics - independent foundations understanding.

First 50 of 190 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Programming, object modelling and software development

In object-oriented programming, encapsulation primarily means:

  1. Bundling data with the methods that operate on it and controlling external access Correct answer.
  2. Making every attribute public with no restrictions
  3. Forbidding the use of methods entirely
  4. Compiling only to machine code without objects

Explanation

Encapsulation groups state and behaviour in a class and uses visibility to protect invariants - a core OOP idea tested in Saxon programming tasks.

Question 2Programming, object modelling and software development

Inheritance in OOP allows a subclass to:

  1. Convert itself into a primitive integer type
  2. Reuse and extend structure and behaviour defined in a superclass Correct answer.
  3. Delete the superclass from memory at compile time only
  4. Avoid having any attributes or methods

Explanation

Inheritance lets a subclass specialize a superclass while reusing shared fields and methods (is-a relationship).

Question 3Programming, object modelling and software development

Polymorphism (in the OOP sense most relevant to Abitur tasks) means:

  1. Programs may not use functions
  2. Only one class may exist in a project
  3. The same interface or method name can operate on objects of different related types Correct answer.
  4. Every variable must have a unique unrelated type forever

Explanation

Polymorphic calls dispatch to the appropriate overriding method based on the runtime type, enabling flexible designs.

Question 4Programming, object modelling and software development

A constructor in Java/Python-style OOP is primarily used to:

  1. Initialize a newly created object's state Correct answer.
  2. Destroy the operating system kernel
  3. Sort global arrays only
  4. Replace the need for any attributes

Explanation

Constructors (or __init__) run when an instance is created to set up initial attribute values and invariants.

Question 5Programming, object modelling and software development

An instance method differs from a class/static method in that it:

  1. Must not have a name
  2. Is identical to a SQL JOIN
  3. Operates on a specific object instance and can use its instance state Correct answer.
  4. Can never read any data

Explanation

Instance methods receive an implicit object (self/this) and may access that object's attributes; static methods belong to the class.

Question 6Programming, object modelling and software development

Overriding a method means:

  1. Deleting all methods from the superclass at runtime
  2. Renaming the subclass only
  3. Converting methods into global variables
  4. A subclass provides its own implementation of a method inherited from a superclass Correct answer.

Explanation

Overriding replaces inherited behaviour for the subclass while keeping the same method signature (subject to language rules).

Question 7Programming, object modelling and software development

Which principle prefers depending on abstractions (interfaces) rather than concrete classes?

  1. Dependency inversion / programming to an interface Correct answer.
  2. Always hard-coding every concrete class name with no abstraction
  3. Forbidding inheritance and interfaces
  4. Storing all data only in CPU registers

Explanation

Designing to interfaces reduces coupling so implementations can vary - a software-engineering idea aligned with modularization Lernziele.

Question 8Programming, object modelling and software development

A parameter passed by value means:

  1. The callee always modifies the caller's variable name binding in every language
  2. No data is transferred
  3. Only files can be parameters
  4. The callee receives a copy of the value (or reference value), so rebinding the parameter does not rebind the caller's variable Correct answer.

Explanation

In Java/Python, object references are passed by value: the callee cannot rebind the caller's variable, though mutable objects' contents may still change.

Question 9Programming, object modelling and software development

Which software quality criterion emphasizes self-explanatory names and clear structure?

  1. Understandability / readability Correct answer.
  2. Maximizing nested spaghetti control flow
  3. Hiding all names behind single-letter globals only
  4. Removing all comments and structure deliberately

Explanation

Saxon Handreichung lists Verständlichkeit and Lesbarkeit (clear names, comments, structure) among program quality criteria derived from software-quality thinking.

Question 10Programming, object modelling and software development

Association vs aggregation vs composition in UML modelling mainly differs by:

  1. Whether integers can be added
  2. The CPU clock speed required
  3. Whether SQL is used
  4. The strength/lifetime coupling between related objects Correct answer.

Explanation

Association is a general link; aggregation is a whole-part with weaker lifetime coupling; composition implies strong ownership/lifetime dependency.

Question 11Programming, object modelling and software development

A recursive function must typically include:

  1. A base case that stops recursion and a recursive case that progresses toward it Correct answer.
  2. Only infinite self-calls with no termination condition
  3. No parameters ever
  4. A mandatory SQL transaction

Explanation

Correct recursion needs a reachable base case; each recursive call should reduce the problem size toward that base.

Question 12Programming, object modelling and software development

Which control-flow structure repeats a block while a condition remains true, testing before each iteration?

  1. A class declaration
  2. while loop Correct answer.
  3. if-else without repetition
  4. A single assignment statement

Explanation

A while loop checks its condition before (or as) each iteration and continues while the condition holds.

Question 13Algorithms, recursion and complexity

In computer science, an algorithm is best defined as:

  1. A finite, precise sequence of unambiguous steps that solves a class of problems Correct answer.
  2. Any set of English sentences describing a computer
  3. A physical CPU instruction only
  4. A database table schema

Explanation

An algorithm is a finite, unambiguous, effective procedure that transforms inputs into outputs for a defined problem class - the foundation of algorithmic problem solving in the Saxon Informatik Lehrplan.

Question 14Algorithms, recursion and complexity

Which sorting algorithm repeatedly compares adjacent elements and swaps them if they are out of order?

  1. Hashing
  2. Bubblesort Correct answer.
  3. Binary search
  4. Depth-first search

Explanation

Bubblesort repeatedly passes through a list, swapping adjacent out-of-order pairs so that extreme values 'bubble' toward one end until the list is sorted.

Question 15Algorithms, recursion and complexity

What is the typical worst-case time complexity of Bubblesort on n elements?

  1. O(1)
  2. O(n!)
  3. O(n²) Correct answer.
  4. O(log n)

Explanation

In the worst case Bubblesort performs nested comparisons across the list, giving quadratic O(n²) growth in n.

Question 16Algorithms, recursion and complexity

Binary search on a sequence requires which precondition?

  1. The sequence must contain only unique values and be unsorted
  2. The sequence length must be a power of two
  3. No precondition is required
  4. The sequence must already be sorted in a consistent order Correct answer.

Explanation

Binary search repeatedly discards half the search interval by comparing with the middle element, which is correct only when the sequence is sorted.

Question 17Algorithms, recursion and complexity

What is the time complexity of binary search on a sorted list of n elements?

  1. O(log n) Correct answer.
  2. O(n²)
  3. O(n!)
  4. O(2^n)

Explanation

Each step halves the remaining interval, so the number of comparisons grows logarithmically with n: O(log n).

Question 18Algorithms, recursion and complexity

Which abstract data type follows the LIFO (Last-In, First-Out) principle?

  1. Unordered bag only
  2. Stack (Stapel) Correct answer.
  3. Queue (Schlange)
  4. Set with no order

Explanation

A stack removes the most recently pushed element first (LIFO), matching the Saxon Lehrplan emphasis on LIFO/FIFO principles.

Question 19Algorithms, recursion and complexity

Which abstract data type follows the FIFO (First-In, First-Out) principle?

  1. Binary search tree root only
  2. Hash table collision chain only
  3. Queue (Schlange) Correct answer.
  4. Stack (Stapel)

Explanation

A queue enqueues at the rear and dequeues from the front, so the earliest inserted element leaves first (FIFO).

Question 20Algorithms, recursion and complexity

In a singly linked list, each node typically stores:

  1. Only an index into a fixed array with no references
  2. Only a previous-node reference with no data
  3. A complete copy of every other list node
  4. A data value and a reference to the next node Correct answer.

Explanation

A singly linked list node holds its payload plus a pointer/reference to the successor, enabling dynamic insertion without shifting an array.

Question 21Algorithms, recursion and complexity

Which traversal of a binary tree visits left subtree, then root, then right subtree?

  1. In-order (Inorder) Correct answer.
  2. Pre-order only
  3. Level-order only
  4. Post-order only

Explanation

In-order traversal processes left, then root, then right. For a binary search tree this yields keys in sorted order.

Question 22Algorithms, recursion and complexity

Which traversal visits the root before its left and right subtrees?

  1. Reverse in-order only
  2. Pre-order (Preorder) Correct answer.
  3. In-order only
  4. Post-order only

Explanation

Pre-order visits the root first, then recursively the left and right subtrees - useful for copying a tree's structure.

Question 23Algorithms, recursion and complexity

In a binary search tree (BST), for every node which property holds?

  1. Keys may appear in any order with no relation to position
  2. Every node must have exactly two children
  3. All keys in the left subtree are less than the node's key, and all keys in the right subtree are greater Correct answer.
  4. Left keys are always greater than the node's key

Explanation

BST search structure places smaller keys left and larger keys right (ties handled by a chosen convention), enabling logarithmic search when the tree is balanced.

Question 24Algorithms, recursion and complexity

Inserting keys 5, then 3, then 7 into an empty BST yields which root?

  1. 3
  2. 7
  3. An empty tree with no root
  4. 5 Correct answer.

Explanation

The first inserted key becomes the root; later keys 3 and 7 attach as left and right children of 5.

Question 25Algorithms, recursion and complexity

Which sorting algorithm divides the list, sorts the halves recursively, then merges them?

  1. Mergesort Correct answer.
  2. Bubblesort
  3. Linear search
  4. Selection of a single median only

Explanation

Mergesort is a divide-and-conquer sort: split, recursively sort, then merge sorted runs in linear time, giving O(n log n) comparisons.

Question 26Algorithms, recursion and complexity

What is the typical time complexity of Mergesort for n elements?

  1. O(log log n)
  2. O(n log n) Correct answer.
  3. O(n²) always in every implementation
  4. O(1)

Explanation

Mergesort's recursion tree has about log n levels, each doing O(n) merge work, so overall O(n log n).

Question 27Algorithms, recursion and complexity

Quicksort's average-case time complexity for n elements is:

  1. O(1)
  2. O(n!)
  3. O(n log n) Correct answer.
  4. O(n²) only, never better

Explanation

With reasonably balanced pivots, Quicksort partitions into subproblems whose depths sum like O(n log n) on average.

Question 28Algorithms, recursion and complexity

When does classic Quicksort degrade to O(n²) worst case?

  1. Only when n is a prime number
  2. Never, under any pivot rule
  3. Only when the array contains strings
  4. When pivots repeatedly produce highly unbalanced partitions (e.g. already sorted input with a naive first/last pivot) Correct answer.

Explanation

If every pivot is an extreme element, one partition is empty and the other has n−1 elements, yielding quadratic total work.

Question 29Algorithms, recursion and complexity

Selection sort finds the minimum of the unsorted suffix and swaps it into position. Its typical time complexity is:

  1. O(n²) Correct answer.
  2. O(log n)
  3. O(n log n) with no nested scans
  4. O(1)

Explanation

Each of n positions may scan up to O(n) remaining elements, giving O(n²) comparisons regardless of input order.

Question 30Algorithms, recursion and complexity

Which statement about Insertion sort is correct?

  1. It is identical to binary search
  2. It builds a sorted prefix by inserting each next element into its proper place among already sorted elements Correct answer.
  3. It always requires Ω(n²) comparisons even on already sorted input
  4. It cannot sort integers

Explanation

Insertion sort grows a sorted prefix: each new key is inserted into the correct position among previous keys, often with shifting.

Question 31Algorithms, recursion and complexity

A complete binary tree of height h (root height 0) has at most how many nodes?

  1. 2h
  2. h²
  3. 2^(h+1) − 1 Correct answer.
  4. h

Explanation

Level i can hold up to 2^i nodes; summing i=0..h yields 2^(h+1)−1 nodes in a perfect tree of height h.

Question 32Algorithms, recursion and complexity

Which data structure is most natural for implementing an undo history of successive editor actions?

  1. Queue only
  2. Unordered set only
  3. A single integer counter only
  4. Stack Correct answer.

Explanation

Undo reverses the most recent action first, matching LIFO stack semantics (push actions, pop to undo).

Question 33Algorithms, recursion and complexity

Breadth-first search (BFS) on a graph typically uses which auxiliary structure?

  1. A queue Correct answer.
  2. A stack only
  3. A min-heap of random keys only
  4. No auxiliary structure ever

Explanation

BFS explores level by level: nodes are enqueued when discovered and dequeued in FIFO order.

Question 34Algorithms, recursion and complexity

Depth-first search (DFS) explores a graph by:

  1. Only visiting nodes with even degree
  2. Going as deep as possible along a path before backtracking Correct answer.
  3. Always expanding the shallowest unexplored node first
  4. Sorting all edges by weight then scanning once

Explanation

DFS plunges along a path to a dead end, then backtracks - implemented with a stack or recursion.

Question 35Algorithms, recursion and complexity

What does a hash table primarily provide under good hashing and load?

  1. Average-case O(1) insert/lookup/delete for keys Correct answer.
  2. Guaranteed O(log n) comparisons like a balanced BST always
  3. Sorted iteration without extra structures
  4. Only sequential scan of all keys

Explanation

Hashing maps keys to buckets; with a good hash function and moderate load factor, expected operations are O(1).

Question 36Algorithms, recursion and complexity

A post-order traversal of a binary tree visits nodes in which relative order?

  1. Right, root, left only as the sole definition
  2. Left subtree, right subtree, then root Correct answer.
  3. Root, left, right
  4. Left, root, right

Explanation

Post-order processes children before the parent - useful for deleting a tree or evaluating expression trees.

Question 37Algorithms, recursion and complexity

Which recurrence roughly describes Mergesort's divide-and-conquer cost T(n)?

  1. T(n) = O(1) for all n>1
  2. T(n) = T(n²) + n
  3. T(n) = 2 T(n/2) + O(n) Correct answer.
  4. T(n) = T(n−1) + O(1) only

Explanation

Mergesort splits into two halves (2 T(n/2)) and merges in linear time O(n), which solves to O(n log n).

Question 38Digital representation and data structures

How many bits are in one byte?

  1. 8 Correct answer.
  2. 4
  3. 16
  4. 1024

Explanation

By definition, one byte equals 8 bits. This is a foundational unit used in performing calculations with bits and bytes, a GACE Data objective.

Question 39Digital representation and data structures

An encoding scheme uses 8 bits to represent each character. How many distinct characters can it represent?

  1. 256 Correct answer.
  2. 8
  3. 128
  4. 16

Explanation

With n bits, you can represent 2 to the power n distinct values. For 8 bits, 2^8 = 256 distinct characters. Determining how many values a given number of bits can encode is a GACE Data objective.

Question 40Digital representation and data structures

Which statement correctly distinguishes lossy from lossless data compression?

  1. Lossless compression preserves all original data exactly, while lossy compression discards some data to achieve smaller file sizes Correct answer.
  2. Lossy compression always preserves every bit of the original data
  3. Lossless compression always produces smaller files than lossy compression
  4. There is no difference between lossy and lossless compression

Explanation

Lossless compression (for example, ZIP or PNG) lets the exact original data be reconstructed, while lossy compression (for example, JPEG or MP3) permanently discards some data to shrink files further. Describing lossy and lossless compression is a GACE Data objective.

Question 41Digital representation and data structures

A teacher explains the difference between encoding and encryption. Which statement is correct?

  1. Encoding transforms data into another format for usability and is easily reversible without a secret, while encryption secures data so it can be read only with a key Correct answer.
  2. Encoding and encryption are identical processes with the same purpose
  3. Encryption is used only to compress files, never to secure them
  4. Encoding requires a secret key to reverse, while encryption never does

Explanation

Encoding changes data into another format (such as ASCII or Base64) for storage or transmission and is reversible by anyone who knows the scheme, whereas encryption deliberately protects data so only a holder of the correct key can read it. Distinguishing encoding from encryption is a GACE Data objective.

Question 42Digital representation and data structures

Ordering common units of digital storage from smallest to largest, which sequence is correct?

  1. Kilobyte, megabyte, gigabyte, terabyte Correct answer.
  2. Gigabyte, megabyte, kilobyte, terabyte
  3. Terabyte, gigabyte, megabyte, kilobyte
  4. Megabyte, kilobyte, gigabyte, terabyte

Explanation

Each unit is roughly a thousand times larger than the previous: kilobyte, megabyte, gigabyte, then terabyte, from smallest to largest. Identifying measures of file size such as byte, kilo, mega, giga, tera, and peta is a GACE Data objective.

Question 43Digital representation and data structures

Approximately how many bytes are needed to store a plain-text document containing 2,000 characters, assuming one byte per character?

  1. About 2,000 bytes (roughly 2 kilobytes) Correct answer.
  2. About 16 bytes
  3. About 2 million bytes
  4. About 8 bytes

Explanation

If each character takes one byte, a 2,000-character document requires about 2,000 bytes, which is roughly 2 kilobytes. Determining the number of bits and bytes required to store a given amount of data is a GACE Data objective.

Question 44Digital representation and data structures

Why are binary numbers fundamental to the operation of computer systems?

  1. Digital hardware represents data using two-state electronic components, such as on/off or high/low voltage, which map naturally to the digits 0 and 1 Correct answer.
  2. Binary is the only number system that can represent fractions
  3. Binary uses ten digits, making it efficient for humans
  4. Binary cannot be converted to any other number base

Explanation

Computers are built from electronic components that have two stable states, commonly represented as 0 and 1, so binary is the natural language of digital hardware. Explaining why binary numbers are fundamental to computer systems is a GACE Data objective.

Question 45Digital representation and data structures

A run-length encoding scheme compresses the string AAAAA by storing it as 5A. This is an example of which kind of compression?

  1. Lossless compression, because the original string can be fully reconstructed Correct answer.
  2. Lossy compression, because data is permanently discarded
  3. Encryption, because the data is now secret
  4. Encoding into hexadecimal

Explanation

Run-length encoding records a count and the repeated symbol (5A for AAAAA) and allows the exact original string to be rebuilt, so it is lossless compression. Describing lossy and lossless compression is a GACE Data objective.

Question 46Digital representation and data structures

A given encoding scheme assigns A = 00, B = 01, C = 10, and D = 11. What string does the encoded sequence 011011 represent?

  1. BCD Correct answer.
  2. ABC
  3. DDB
  4. BDD

Explanation

Split the fixed-length sequence into two-bit groups from left to right: 01, 10, 11. These map to B, C, and D respectively, giving BCD. Decoding data given an encoding scheme is a GACE Data objective.

Question 47Entity modelling, relational algebra and SQL

In the relational model, a relation/table is best described as:

  1. An unsorted collection of arbitrary files only
  2. A CPU register file
  3. A set of tuples (rows) over a fixed set of attributes (columns) Correct answer.
  4. A single nested HTML page

Explanation

Relational tables have a schema of attributes; each row is a tuple of values for those attributes.

Question 48Entity modelling, relational algebra and SQL

A primary key uniquely identifies:

  1. Only columns, never rows
  2. The database server's IP address only
  3. Every SQL keyword
  4. Each row in a table Correct answer.

Explanation

The primary key's values uniquely identify tuples and must not be NULL (in standard relational practice).

Question 49Entity modelling, relational algebra and SQL

First Normal Form (1NF) requires that:

  1. All data is stored as free text only
  2. Attribute values are atomic (no repeating groups / nested tables in a cell) Correct answer.
  3. Every table has at least 100 columns
  4. No primary key exists

Explanation

1NF eliminates multi-valued/repeating groups so each intersection of row and column holds a single atomic value.

Question 50Entity modelling, relational algebra and SQL

An INNER JOIN between tables A and B returns:

  1. Only column names without data
  2. Only rows where the join condition matches in both tables Correct answer.
  3. All rows of A even without matches in B
  4. A Cartesian product with no condition ever

Explanation

INNER JOIN keeps combinations satisfying the ON/WHERE join predicate; unmatched rows from either side are dropped.