MCQ Bank
The object which depends on a subject and updates according to its subject’s state is called ________________.
- A) Loader
- B) Observer
- C) State Machine
- D) Linker
How many bad smells fall in Bloaters?
- A) Three
- B) Six
- C) Four
- D) Five
At the time of refactoring, the ________________ behavior of the ________________ does not change.
- A) External, Object
- B) External, System
- C) Internal, Object
- D) Internal, System
Code has to work mostly correctly before you _________________ it.
- A) Refactor
- B) Freeze
- C) Hacked
- D) Rewrite
Reflexive associations are an association to connect a class to___________.
- A) Each other
- B) Others
- C) Itself
- D) One another
____________ deal with dynamic interactions among societies of classes and objects.
- A) Architectural patterns
- B) Structural patterns
- C) Creational patterns
- D) Behavioural patterns
Façade Design Pattern is a ________________.
- A) Structural Pattern
- B) Observer Pattern
- C) Creational Pattern
- D) Behavioral Pattern
___________deal with initializing and configuring classes and objects.
- A) Behavioural Patterns
- B) Creational Patterns
- C) Structural Patterns
- D) Bridge Patterns
In ________________________the ends of the association are semantically different from each other, even though the associated class is the same.
- A) Symmetric Reflexive Association
- B) Reflexive Association
- C) Symmetric Association
- D) Asymmetric Reflexive Association
How many bad smells fall in Object-orientation abusers?
- A) Three
- B) Four
- C) Five
- D) Six
In state design patterns, by ________________ each state in a class, we localize any changes that need to be made.
- A) Aggregating
- B) Encapsulating
- C) Associating
- D) Inheriting
In order to avoid having instances changing their own classes, we have to ensure that we ___________.
- A) Destroy the old one and create a new one
- B) Destroy all the instances of a class with no addition of new instances
- C) Keep the old one and also create a new one
- D) Destroy the old one and avoid creating a new one
_____________ defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
- A) Strategy Pattern
- B) MVC Pattern
- C) Singleton Pattern
- D) Design Pattern
The benefit of the state pattern is that state-specific logic is localized in ________________ that represent that state.
- A) Structures
- B) Classes
- C) Functions
- D) Arrays
By using strategy design pattern, you can change the behavior of context by ________________ it with different objects.
- A) Inheriting
- B) Aggregating
- C) Encapsulating
- D) Associating
In the specialization a____________________can be thought of an attribute that will have a different value in each subclass.
- A) Tag
- B) Discriminator
- C) Ticket
- D) Marker
Fowler’s book assigns “names” to refactoring in the same way that the _________________ book assigned names to patterns.
- A) K. N. Thompson
- B) GoF's
- C) William C. Wake
- D) Steven Metsker
In case of a tree data structure, all ________________ have the same structure and behavior.
- A) Classes
- B) Variables
- C) Objects
- D) Nodes
Design pattern ____________ is the abstract description of design problems and how the pattern solves it.
- A) Problem
- B) Solution
- C) Name
- D) Element
_________ should be followed if you want to avoid duplicating data.
- A) Abstraction-Occurrence Pattern
- B) Player Role Pattern
- C) General Hierarchy Pattern
- D) Facade Pattern