CAIE 9701 PAPER 3 2024 COMPLETE QUESTIONS AND
ANSWERS WITH VERIFIED SOLUTION
1. Which of the following statements about object-oriented
programming (OOP) is correct?
A. Objects in OOP cannot be modified after creation.
B. OOP encourages the use of inheritance and polymorphism.
C. OOP only supports procedural programming.
D. All OOP classes must implement interfaces.
Answer: B) OOP encourages the use of inheritance and polymorphism.
Rationale: Object-oriented programming promotes concepts like
inheritance (reusing code) and polymorphism (the ability to use objects
of different classes through the same interface).
2. Which of the following is a correct use of the SQL 'JOIN' statement?
A. To combine rows from two or more tables based on a related
column.
B. To update data in a table.
C. To delete a table from a database.
D. To define the structure of a table.
Answer: A) To combine rows from two or more tables based on a
related column.
Rationale: The JOIN statement is used in SQL to combine data from
two or more tables based on a common column, typically a foreign key.
3. Which of the following best describes the concept of 'encapsulation'
in object-oriented programming?
A. The ability of different classes to share data.
B. The ability to create objects from multiple classes.
C. The ability to hide the internal state of an object and only expose
methods to interact with it.
,D. The ability to override methods in a subclass.
Answer: C) The ability to hide the internal state of an object and only
expose methods to interact with it.
Rationale: Encapsulation involves bundling data and methods that
operate on that data into a single unit (a class), while hiding the
internal state and only exposing necessary methods.
4. Which of the following algorithms is an example of a divide and
conquer algorithm?
A. Insertion Sort
B. Quick Sort
C. Selection Sort
D. Bubble Sort
Answer: B) Quick Sort
Rationale: Quick Sort is a divide and conquer algorithm because it
divides the array into subarrays, recursively sorts them, and then
combines the results.
5. What is the time complexity of the bubble sort algorithm?
A. O(n)
B. O(n^2)
C. O(log n)
D. O(n log n)
Answer: B) O(n^2)
Rationale: The bubble sort algorithm has a time complexity of O(n^2)
because it requires multiple passes through the data, with each pass
involving comparisons of adjacent elements.
6. What is the primary use of a 'middleware' in software development?
A. To directly manage user interfaces.
B. To handle database queries.
, C. To provide communication services between software components
or systems.
D. To store files and media in the cloud.
Answer: C) To provide communication services between software
components or systems.
Rationale: Middleware acts as a bridge between different software
components or systems, enabling them to communicate effectively.
7. Which of the following is true about the insertion sort algorithm?
A. It always has a time complexity of O(n log n).
B. It is efficient for large datasets.
C. It is an in-place sorting algorithm.
D. It requires a large amount of extra space.
Answer: C) It is an in-place sorting algorithm.
Rationale: Insertion sort is an in-place algorithm, meaning it sorts the
array without needing extra space for another array. Its time
complexity is O(n^2), making it inefficient for large datasets.
8. In a relational database, what does the term 'foreign key' refer to?
A. A column that is unique within the database
B. A column that links two tables together
C. A column that can have multiple NULL values
D. A column that stores large text data
Answer: B) A column that links two tables together
Rationale: A foreign key is a column in one table that refers to the
primary key in another table, establishing a relationship between them.
9. Which of the following operations is performed by a compiler?
A. Fetching data from memory
B. Translating high-level language code to machine code
C. Managing input/output devices
ANSWERS WITH VERIFIED SOLUTION
1. Which of the following statements about object-oriented
programming (OOP) is correct?
A. Objects in OOP cannot be modified after creation.
B. OOP encourages the use of inheritance and polymorphism.
C. OOP only supports procedural programming.
D. All OOP classes must implement interfaces.
Answer: B) OOP encourages the use of inheritance and polymorphism.
Rationale: Object-oriented programming promotes concepts like
inheritance (reusing code) and polymorphism (the ability to use objects
of different classes through the same interface).
2. Which of the following is a correct use of the SQL 'JOIN' statement?
A. To combine rows from two or more tables based on a related
column.
B. To update data in a table.
C. To delete a table from a database.
D. To define the structure of a table.
Answer: A) To combine rows from two or more tables based on a
related column.
Rationale: The JOIN statement is used in SQL to combine data from
two or more tables based on a common column, typically a foreign key.
3. Which of the following best describes the concept of 'encapsulation'
in object-oriented programming?
A. The ability of different classes to share data.
B. The ability to create objects from multiple classes.
C. The ability to hide the internal state of an object and only expose
methods to interact with it.
,D. The ability to override methods in a subclass.
Answer: C) The ability to hide the internal state of an object and only
expose methods to interact with it.
Rationale: Encapsulation involves bundling data and methods that
operate on that data into a single unit (a class), while hiding the
internal state and only exposing necessary methods.
4. Which of the following algorithms is an example of a divide and
conquer algorithm?
A. Insertion Sort
B. Quick Sort
C. Selection Sort
D. Bubble Sort
Answer: B) Quick Sort
Rationale: Quick Sort is a divide and conquer algorithm because it
divides the array into subarrays, recursively sorts them, and then
combines the results.
5. What is the time complexity of the bubble sort algorithm?
A. O(n)
B. O(n^2)
C. O(log n)
D. O(n log n)
Answer: B) O(n^2)
Rationale: The bubble sort algorithm has a time complexity of O(n^2)
because it requires multiple passes through the data, with each pass
involving comparisons of adjacent elements.
6. What is the primary use of a 'middleware' in software development?
A. To directly manage user interfaces.
B. To handle database queries.
, C. To provide communication services between software components
or systems.
D. To store files and media in the cloud.
Answer: C) To provide communication services between software
components or systems.
Rationale: Middleware acts as a bridge between different software
components or systems, enabling them to communicate effectively.
7. Which of the following is true about the insertion sort algorithm?
A. It always has a time complexity of O(n log n).
B. It is efficient for large datasets.
C. It is an in-place sorting algorithm.
D. It requires a large amount of extra space.
Answer: C) It is an in-place sorting algorithm.
Rationale: Insertion sort is an in-place algorithm, meaning it sorts the
array without needing extra space for another array. Its time
complexity is O(n^2), making it inefficient for large datasets.
8. In a relational database, what does the term 'foreign key' refer to?
A. A column that is unique within the database
B. A column that links two tables together
C. A column that can have multiple NULL values
D. A column that stores large text data
Answer: B) A column that links two tables together
Rationale: A foreign key is a column in one table that refers to the
primary key in another table, establishing a relationship between them.
9. Which of the following operations is performed by a compiler?
A. Fetching data from memory
B. Translating high-level language code to machine code
C. Managing input/output devices