MCQ Bank
Modules that conform to the __________ principle are open for extension and closed for modification.
- A) DIP
- B) ISP
- C) LSP
- D) OCP
Typically, dependency injection is used simply by ‘injecting’ any dependencies of a class through the class ___________ as an input parameter.
- A) Constructor
- B) Object
- C) Destructor
- D) Interface
In programming, the __________________ states that no client should be forced to depend on methods it does not use.
- A) ISP
- B) LSP
- C) DIP
- D) OCP
In programming, the ________________ is a way to decouple software modules.
- A) OCP
- B) ISP
- C) LSP
- D) DIP
What is true about the strategy pattern? It defines a family of interchangeable algorithm It encapsulates each algorithm It does not let the algorithm vary independently from the clients that use it
- A) Both 1 & 2
- B) Only 2
- C) Only 1
- D) Only 3
Strategy Pattern is a __________
- A) Class Pattern
- B) Creational Pattern
- C) Behavioral Pattern
- D) Structural Pattern
Which design pattern will be appropriate for the application where the sorting algorithm (Bubble sort, QuickSort, MergeSort, etc.) can be decided at runtime?
- A) Strategy Pattern
- B) Factory Pattern
- C) Singleton Pattern
- D) Facade Pattern
Design Patterns have ____ essential elements.
- A) 4
- B) 3
- C) 1
- D) 2
//Here, we have an interface “sampleInterface” with only one method. interface sampleInterface { double sampleMethod(double arg); } //The implementation of the method is provided in the classA class classA ________ sampleInterface { @Override double sampleMethod(double arg); { return arg * (10); } } Fill in the blank by choosing an appropriate keyword from the given options.
- A) extends
- B) ref
- C) implements
- D) inherits
Which of the following is not included in Architectural design decisions?
- A) Distribution of the system
- B) Testing the system
- C) Architectural styles
- D) Type of application
Which view in architectural design shows the key abstractions in the system as objects or object classes?
- A) Process
- B) Logical
- C) Physical
- D) Development
Which of the following view shows that the system is composed of interacting processes at run time?
- A) Physical
- B) Development
- C) Process
- D) Logical
A ________ view shows the system hardware and how software components are distributed across the processors in the system.
- A) Logical
- B) Development
- C) Physical
- D) Process
The UML was designed for describing _________
- A) Object-oriented systems
- B) Architectural design
- C) Both object-oriented systems and Architectural design
- D) SRS
To show the present condition of the object _____________ can be used, because it sustains address to concrete state object.
- A) State
- B) Function
- C) Context
- D) Concrete State
______________ handle request from the ______________.
- A) Concrete State, context
- B) State, context
- C) Context, concrete state
- D) Context, state
For the purpose of interaction, _____________ can be used to show an interface to the client.
- A) Concrete State
- B) State
- C) Context
- D) Function
Which one of the following provides implementation for methods described in state?
- A) Context
- B) State
- C) Concrete State
- D) Function
Which one of the following statement will be true for state pattern?
- A) It doesn't allow an object to change its behaviour when it’s internal state changes.
- B) It doesn't allow an object to change its behaviour when it’s external state changes.
- C) It allows an object to change its behaviour when it’s internal state changes.
- D) It allows an object to change its behaviour when it’s external state changes.
Model View Controller (MVC) ensures _________ among models, views or controllers.
- A) Low cohesion
- B) High coupling
- C) Hard modifiability
- D) Low coupling