Final Exam Practice Questions and Detailed Solutions Latest
Update 2026/2027 | UML, Software Architecture, Design
Patterns, Verified Answers - 198 Questions
This comprehensive final exam assesses advanced proficiency in object-oriented analysis and design, including
UML modeling, architectural styles, design patterns, and their application to complex software systems. It
emphasizes critical reasoning, synthesis of concepts, and application to novel scenarios. It contains 198
multiple-choice questions, each with four distractors and a fully worked rationale that explains why the keyed
answer is correct. Questions are organized into clearly labelled sections that mirror the major content areas of
the course. Targeted learning outcomes include: Analyze and model complex software systems using UML
diagrams, including class, sequence, state, and component diagrams.; Evaluate and select appropriate
architectural styles and design patterns to solve non-trivial design problems, considering trade-offs.; Apply
principles of object-oriented design (SOLID, GRASP) to create robust, maintainable, and scalable software
architectures.; Critically assess the impact of design decisions on system quality attributes such as
maintainability, extensibility, and performance.. Every item has been reviewed for clinical accuracy, current
guidelines, and clarity so that students can study with confidence and self-correct as they work through the bank.
Use it as a high-yield review immediately before the exam, or as a structured practice tool during the unit - the
rationales double as concise teaching notes. The recommended writing time is 3 hours, with a passing score of
70%. Aligned with This exam adheres to the rigorous academic standards of R1 research universities (e.g., Ivy
Section 1: General (Questions 1-198)
1 In the context of UML 2.5, which of the following is the most
precise interpretation of a 'qualified association' between a
'Customer' class and an 'Order' class, where the qualifier is
'orderNumber'?
A) It is a special kind of association that requires the 'orderNumber'
to be unique across all customers.
B) It is an association that reduces the multiplicity of the 'Order' end
by using the 'orderNumber' as a key to uniquely identify an order
within the context of a customer.
C) It is an association class that stores the 'orderNumber' as an
attribute of the association.
D) It is a derived association that is computed from the
'orderNumber' attribute of the 'Order' class.
Answer: B
Rationale: A qualified association uses a qualifier attribute to partition
the set of associated objects, effectively reducing the multiplicity at
,the target end. In this case, for a given Customer, each orderNumber
maps to at most one Order, so the multiplicity at the Order end
becomes 0..1. Option A confuses uniqueness across all customers;
option C describes an association class; option D misinterprets the
qualifier as a derived attribute.
2 A system's requirements specify that the user interface must be
developed independently of the business logic, allowing for multiple
future clients (web, mobile, desktop) without altering core
functionality. Which architectural pattern best achieves this
separation, and what is its primary trade-off?
A) Layered Architecture; trade-off is increased coupling between
layers.
B) Model-View-Controller (MVC); trade-off is increased complexity
and potential performance overhead due to indirection.
C) Repository Pattern; trade-off is reduced flexibility in data access.
D) Client-Server Architecture; trade-off is centralization of business
logic.
Answer: B
Rationale: MVC explicitly separates presentation (View), user input
handling (Controller), and business logic (Model), enabling
independent evolution of the UI and core logic. The trade-off is added
complexity and potential performance overhead from the indirection
between components. Layered architecture also separates concerns but
typically in a more rigid manner; Repository and Client-Server do not
directly address UI independence.
3 In the context of GRASP, which of the following is the most
appropriate assignment of responsibility for saving a
'PurchaseOrder' object to a database, considering the principle of
High Cohesion and Low Coupling?
A) Assign the responsibility to the 'PurchaseOrder' class itself, as it
knows its own data.
,B) Assign the responsibility to a separate 'PersistenceService' class,
which encapsulates the database logic.
C) Assign the responsibility to a 'ReportGenerator' class that also
handles data export.
D) Assign the responsibility to the 'UserInterface' class that initiates
the save action.
Answer: B
Rationale: Assigning persistence to a separate 'PersistenceService'
adheres to High Cohesion by keeping persistence concerns isolated,
and to Low Coupling by reducing the PurchaseOrder's dependency on
database technology. Option A increases coupling and reduces
cohesion by mixing business logic with persistence; option C violates
High Cohesion by combining unrelated responsibilities; option D
places persistence in the UI layer, which is poor design.
4 A software architect is designing a real-time trading system that
must handle a high volume of market data updates and provide
low-latency responses to client queries. Which combination of
architectural styles is most suitable, and why?
A) Microservices with RESTful APIs, to ensure scalability and loose
coupling.
B) Event-Driven Architecture with a message broker, to decouple
producers and consumers and enable asynchronous processing.
C) Layered Architecture with a shared database, to ensure data
consistency.
D) Pipe-and-Filter with synchronous communication, to process data
streams sequentially.
Answer: B
Rationale: Event-Driven Architecture excels in real-time systems
where asynchronous, low-latency processing of high-velocity data is
required. It decouples producers (market data feeds) from consumers
(trading algorithms, client alerts) via a broker, enabling parallel
processing and scalability. Microservices with REST often introduce
, synchronous overhead; layered with shared DB can become a
bottleneck; pipe-and-filter is less suited for dynamic, low-latency
interactions.
5 In the context of the Decorator pattern, which of the following
statements accurately describes its impact on the Open/Closed
Principle and the overall class hierarchy?
A) It violates Open/Closed by requiring modification of existing
classes to add new behavior.
B) It supports Open/Closed by allowing behavior extension without
modifying existing classes, but it can lead to many small classes that
increase complexity.
C) It supports Open/Closed by using inheritance to add behavior at
compile time, but it increases coupling.
D) It has no impact on Open/Closed because it uses composition
exclusively.
Answer: B
Rationale: The Decorator pattern allows adding responsibilities to
objects dynamically without modifying their classes, thus adhering to
the Open/Closed Principle. However, it often results in a proliferation
of small, similar classes (e.g., CompressionDecorator,
EncryptionDecorator), which can complicate the design and make it
harder to understand. Option A is incorrect because decorators avoid
modification; option C confuses with inheritance-based extension;
option D is false because it does impact design by promoting
extensibility.
6 Consider a system that needs to send notifications through multiple
channels (email, SMS, push). The set of channels is likely to change
over time. Which pattern provides the most flexible way to manage
this variability, and what is its main drawback?
A) Factory Method: encapsulates channel creation but requires
subclassing for each new channel.