Software Engineering-I MCQs with Answers
Practice important Software Engineering-I MCQs with answers and explanations.
Chapter: 26
Q461:
The term "anti-patterns" refers to __________.
A. common mistakes in analysis and design
B. design patterns that are rarely used
C. design patterns that are outdated
D. design patterns that are overly complex
Correct Answer:
A
Chapter: 26
Q462:
The core components of documenting a design pattern include motivation, context, and __________. implementation
A. design goals
B. examples
C. solutions
Correct Answer:
C
Chapter: 26
Q463:
Which of the following is a category of design patterns?
A. Structural patterns
B. Syntax patterns
C. Function patterns
D. Variable patterns
Correct Answer:
A
Chapter: 26
Q464:
Creational patterns focus on __________.
A. how to destroy objects
B. how to create and instantiate objects
C. how to optimize performance
D. how to refactor code
Correct Answer:
B
Chapter: 26
Q465:
The book "Design Patterns: Elements of Reusable Object-Oriented Software" was published by __________.
A. Grady Booch
B. Richard Helm
C. Erich Gamma
D. John Vlissides
Correct Answer:
C
Chapter: 26
Q466:
Behavioral patterns primarily deal with __________.
A. creating objects
B. object composition
C. class structure
D. communication between objects
Correct Answer:
D
Chapter: 26
Q467:
Fill in the blank: The general form for documenting design patterns includes defining the ________.
A. participants
B. framework
C. constraints
D. algorithms
Correct Answer:
A
Chapter: 26
Q468:
The historical perspective of design patterns began with the works of which architect?
A. Erich Gamma
B. Christopher Alexander
C. Grady Booch
D. Kent Beck
Correct Answer:
B
Chapter: 26
Q469:
The "Solution" section of a design pattern description includes __________.
A. an explanation of why the pattern works
B. how to use the pattern
C. how to implement the pattern
D. a summary of examples
Correct Answer:
C
Chapter: 26
Q470:
Creational patterns abstract the instantiation process to make the system __________.
A. complex
B. dependent on hardware
C. independent of its creational process
D. inefficient
Correct Answer:
C
Chapter: 26
Q471:
In which book did Christopher Alexander discuss patterns in buildings and towns?
A. A Pattern Language
B. A Timeless Way of Building
C. The Design Pattern Book
D. The Architect's Handbook
Correct Answer:
A
Chapter: 26
Q472:
What does the "Forces" section of a design pattern describe?
A. Goals and objectives
B. Participants involved
C. Motivational scenarios and conflicts
D. Implementation details
Correct Answer:
C
Chapter: 26
Q473:
Fill in the blank: The pattern movement became quiet until ________ when patterns reappeared at an OOPSLA conference.
A. 1990
B. 1987
C. 1985
D. 1995
Correct Answer:
B
Chapter: 26
Q474:
What are creational patterns primarily concerned with?
A. Establishing relationships between classes
B. How to create and instantiate objects
C. Handling object communication
D. Optimizing algorithms
Correct Answer:
B
Chapter: 26
Q475:
Design patterns allow programs to __________.
A. share knowledge about their design
B. avoid any form of design
C. implement a single solution
D. ignore coding standards
Correct Answer:
A
Chapter: 26
Q476:
Which of the following is NOT a component of the GoF design pattern format?
A. Name
B. Context
C. Implementation
D. Known uses
Correct Answer:
C
Chapter: 27
Q477:
What is the main purpose of the Observer Pattern?
A. To define a one-to-one relationship between objects
B. To define a many-to-many relationship between objects
C. To simplify complex data structures
D. To create single-instance objects
Correct Answer:
B
Chapter: 27
Q478:
In which programming language was the Observer Pattern first used?
A. C++
B. Java
C. Smalltalk
D. Python
Correct Answer:
C
Chapter: 27
Q479:
The Observer Pattern is often used in which design pattern architecture?
A. Layered architecture
B. MVC pattern
C. Singleton pattern
D. Facade pattern
Correct Answer:
B
Chapter: 27
Q480:
What does the ConcreteSubject do in the Observer Pattern?
A. It attaches observers to the subject
B. It detaches observers from the subject
C. It stores state of interest to observers
D. It notifies observers of state changes
Correct Answer:
C