Assurance
Comprehensive Objective Assessment (Qns &
Ans)
2025
Question 1 (Multiple Choice)
Question:
Which design pattern is primarily used to decouple an abstraction
from its implementation so that both can vary independently?
A) Observer
B) Bridge
C) Decorator
D) Strategy
Correct ANS:
©2025
,B) Bridge
Rationale:
The Bridge pattern separates the abstraction from its
implementation, allowing both to evolve independently. This
decoupling is crucial in creating flexible and scalable software
designs.
---
Question 2 (Multiple Choice)
Question:
In object-oriented design, violating which principle can lead to a
subclass that fails to substitute its superclass without altering
program behavior?
A) Interface Segregation Principle
B) Liskov Substitution Principle
C) Dependency Inversion Principle
D) Single Responsibility Principle
Correct ANS:
B) Liskov Substitution Principle
©2025
, Rationale:
The Liskov Substitution Principle (LSP) insists that subclasses
must be fully substitutable for their base classes. A breach of this
principle indicates that the subclass does not adhere to the
contract defined by the superclass, resulting in potential design
flaws.
---
Question 3 (Fill in the Blank)
Question:
The principle that advises keeping a module focused on a single
task, thereby reducing complexity, is known as the ______
Principle.
Correct ANS:
Single Responsibility
Rationale:
The Single Responsibility Principle (SRP) is one of the SOLID
principles, ensuring that a class or module has only one reason to
change, which promotes better maintainability and cohesive code
design.
©2025
, ---
Question 4 (True/False)
Question:
Refactoring code can improve internal software quality without
altering its external behavior.
Correct ANS:
True
Rationale:
Refactoring is the process of restructuring existing code while
preserving its functionality. This practice enhances readability,
maintainability, and performance without affecting how the
software behaves externally.
---
Question 5 (Multiple Response)
Question:
©2025