Quality Assurance
Finals Assessment Review
(Questions & Solutions)
2025
©2025
, Q1. Which design pattern is most effective for decoupling an
abstraction from its implementation so that both can vary
independently?
A. Decorator Pattern
B. Bridge Pattern
C. Observer Pattern
D. Singleton Pattern
<br> ANS: B (Bridge Pattern)
<br> Rationale: The Bridge pattern separates an abstraction from its
implementation, allowing the two to evolve independently and
promoting modularity and extensibility.
---
Q2. Which of the following is a primary benefit of using design patterns
in software design?
A. They guarantee a performance improvement in all cases.
B. They provide reusable, proven solutions to frequently occurring design
problems.
C. They remove the need for thorough software requirements analysis.
D. They enforce that software be developed using only object-oriented
techniques.
<br> ANS: B
<br> Rationale: Design patterns capture best practices that have
evolved over time and provide developers with proven solutions to
common problems, thereby improving design quality and maintainability.
---
Q3. In quality assurance, which metric is most commonly used to
measure code complexity?
A. Lines of Code
©2025
,B. Cyclomatic Complexity
C. Function Point Analysis
D. Code Churn
<br> ANS: B (Cyclomatic Complexity)
<br> Rationale: Cyclomatic complexity measures the number of
independent paths through a program’s source code and is a widely
accepted indicator of code complexity and potential maintainability
issues.
---
Q4. What does the Open‑Closed Principle (OCP) advocate in software
design?
A. Classes should be open for modification and closed for extension.
B. Classes should be closed for modification but open for extension.
C. Software modules should remain closed to external dependencies.
D. Interfaces should always remain open to changes.
<br> ANS: B
<br> Rationale: According to the OCP, software entities (classes,
modules, functions) should be open for extension (allowing new
functionality) but closed for modification, thereby reducing the risk of
introducing new errors into existing code.
---
Q5. Which architectural pattern is specifically designed to separate an
application into three interconnected components: the Model, the View,
and the Controller?
A. Layered Architecture
B. Microservices Architecture
C. Model‑View‑Controller (MVC)
D. Service‑Oriented Architecture (SOA)
<br> ANS: C (Model‑View‑Controller)
<br> Rationale: MVC divides an application into three components—
Model (data), View (UI), and Controller (logic)—to separate concerns and
©2025
, improve scalability, testability, and maintainability.
---
Q6. Which testing type focuses on evaluating individual units or
components of the source code to ensure each part functions correctly?
A. Integration Testing
B. Unit Testing
C. System Testing
D. Acceptance Testing
<br> ANS: B (Unit Testing)
<br> Rationale: Unit testing targets the smallest testable parts of an
application (such as functions or classes) to verify correctness before
integrating them into the larger system.
---
Q7. What is the primary purpose of static code analysis in quality
assurance?
A. To detect runtime exceptions by executing the code repeatedly.
B. To analyze source code for potential issues without executing it.
C. To simulate user scenarios and interactions for UI testing.
D. To automatically generate documentation for software features.
<br> ANS: B
<br> Rationale: Static code analysis tools examine source code for
potential defects, coding standard violations, and design issues without
running the program, thereby providing an early indication of code
quality concerns.
---
Q8. Which quality assurance practice involves systematically reviewing
code by peers before it is merged into the main codebase?
A. Black‑box Testing
B. Code Peer Reviews
©2025