• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 49 pages
Exam (elaborations)

Cos2614 Latest Exam Questions And Correct Answers (Verified Answers) Plus Rationales 2026 Q&A | Instant Download Pdf

Document preview thumbnail
Preview 4 out of 49 pages

COS2614 LATEST EXAM QUESTIONS AND CORRECT ANSWERS (VERIFIED ANSWERS) PLUS RATIONALES 2026 Q&A | INSTANT DOWNLOAD PDF

Content preview

COS2614 LATEST EXAM QUESTIONS
AND CORRECT ANSWERS (VERIFIED
ANSWERS) PLUS RATIONALES 2026 Q&A
| INSTANT DOWNLOAD PDF

Core Domains
• Object-Oriented Programming Principles: Abstraction,
Encapsulation, Inheritance, Polymorphism
• C++ Programming Language: Syntax, Classes, Memory
Management, Pointers, Templates
• Qt Framework: Widgets, Signals and Slots, Event Handling, GUI
Design
• UML Class Diagrams: Relationships, Inheritance, Composition,
Aggregation
• Design Patterns: Creational, Structural, and Behavioral Patterns
• Exception Handling and File I/O in C++
• Recursion, Algorithm Analysis, and Data Structures
• Advanced C++ Features: Smart Pointers, Move Semantics, Lambda
Expressions
• Software Design Principles and SOLID Principles


Introduction
This examination assesses comprehensive knowledge and applied skills in
object-oriented programming using C++ and the Qt framework, as
prescribed by the COS2614 module at the University of South Africa.

,Candidates are expected to demonstrate proficiency in designing and
implementing object-oriented software systems, applying industry-
approved processes, and solving real-world problems within South African
and global contexts. The examination consists of multiple-choice questions
and scenario-based problems designed to test both foundational
understanding and higher-order critical thinking. Each question requires
careful analysis, application of OOP principles, and clinical decision-
making within the framework of formal software design. Success on this
examination reflects mastery of the core competencies required for
competent programming and advanced study in computer science.


SECTION ONE: QUESTIONS 1–100


Question 1
In object-oriented programming, encapsulation is achieved through:
A. Public data members and private member functions
B. Private data members and public member functions
C. Public inheritance and polymorphism
D. Abstract classes and interfaces

B. Private data members and public member functions

RATIONALE: Encapsulation bundles data and methods that operate
on that data, hiding internal details. Private data members ensure data is
accessed only through public member functions, protecting integrity.
Option A reverses access specifiers.


Question 2
Which of the following correctly describes inheritance in C++?

,A. A derived class inherits all members, including private members
B. A derived class can access private members of the base class
C. A derived class inherits public and protected members of the base
class
D. A derived class cannot override base class functions

C. A derived class inherits public and protected members of the
base class

RATIONALE: In C++, a derived class inherits public and protected
members from the base class. Private members are inherited but not
directly accessible. Option A is incorrect because private members are
not accessible.


Question 3
What is the output of the following C++ code?
cpp
class A {
public:
virtual void show() { cout << "A"; }
};
class B : public A {
public:
void show() override { cout << "B"; }
};
A* obj = new B();
obj->show();

, A. A
B. B
C. Compilation error
D. Undefined behavior

B. B

RATIONALE: The show() function is declared virtual in the base class.
Dynamic dispatch calls the overridden function in the derived class
based on the runtime type, which is B. This is a classic example of
polymorphism.


Question 4
Which principle of object-oriented programming allows a class to have
multiple methods with the same name but different parameters?
A. Inheritance
B. Encapsulation
C. Polymorphism (Overloading)
D. Abstraction

C. Polymorphism (Overloading)

RATIONALE: Function overloading is a form of compile-time
polymorphism where multiple functions share the same name but differ
in parameter types or counts. This allows the same name to represent
different behaviors based on context.


Question 5
In the Qt framework, which mechanism is used for communication
between objects?
A. Callback functions
B. Signals and slots

Document information

Uploaded on
September 1, 2026
Number of pages
49
Written in
2026/2027
Type
Exam (elaborations)
Contains
Unknown
$25.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BestwriterGuru
4.8
(725)
Sold
254
Followers
34
Items
5502
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions