0% found this document useful (0 votes)
13 views6 pages

Sadp MCQ

Software architecture and design pattern quiz

Uploaded by

sushibshetty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Sadp MCQ

Software architecture and design pattern quiz

Uploaded by

sushibshetty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1. What is the primary goal of software architecture?

A. Reduce coding time


B. Provide a blueprint for system design
C. Improve hardware compatibility
D. Ensure perfect execution

Answer: B

2. Which of the following describes a monolithic architecture?


A. Independent modules communicate via APIs
B. All components are tightly coupled
C. Services are distributed across a network
D. Separate layers handle specific concerns

Answer: B

3. A system is designed with a centralized database and tightly coupled modules. What
architecture is this?
A. Client-Server
B. Monolithic
C. Microservices
D. Event-Driven

Answer: B

4. A web app offloads heavy computation to a distributed cloud service. Which architectural
style is most relevant?
A. Layered Architecture
B. Client-Server
C. Event-Driven
D. Microservices

Answer: B

5. Which pattern creates objects without specifying their concrete classes?


A. Factory Method
B. Adapter
C. Proxy
D. Flyweight

Answer: A
6. The Singleton Pattern ensures:
A. All instances of a class are identical
B. A class has only one instance
C. Objects are created in factories
D. Memory usage is minimized

Answer: B

7. An application needs to dynamically instantiate objects at runtime based on input. Which


pattern is ideal?
A. Builder
B. Prototype
C. Singleton
D. Factory Method

Answer: D

8. A gaming app reuses preconfigured objects to speed up initialization. Which pattern is


used?
A. Prototype
B. Abstract Factory
C. Flyweight
D. Singleton

Answer: A

9. What is the primary purpose of the Facade Pattern?


A. Improve system performance
B. Simplify subsystem interactions
C. Enable runtime behavior modification
D. Share state between objects

Answer: B

10. Which pattern allows incompatible interfaces to work together?


A. Proxy
B. Adapter
C. Composite
D. Bridge

Answer: B
11. A library system uses a class to combine and treat books, magazines, and newspapers
uniformly. Which pattern does it employ?
A. Composite
B. Bridge
C. Flyweight
D. Facade

Answer: A

12. A drawing app separates shapes from the rendering logic, enabling changes to either.
Which pattern is this?
A. Bridge
B. Decorator
C. Adapter
D. Composite

Answer: A

13. Why does the Flyweight Pattern improve system performance?


A. It reduces the number of instances created
B. It eliminates the need for object hierarchies
C. It optimizes communication between objects
D. It increases cache hit rates

Answer: A

14. How does the Proxy Pattern control access to objects?


A. By using caching to improve response time
B. By acting as a placeholder for real objects
C. By merging multiple interfaces into one
D. By splitting object responsibilities

Answer: B

15. Which pattern defines a family of algorithms and lets clients choose one at runtime?
A. Observer
B. Strategy
C. Iterator
D. Command

Answer: B
16. Which pattern is most appropriate for undo functionality in applications?
A. Memento
B. Command
C. Observer
D. State

Answer: A

17. A notification system updates all observers when the state of a subject changes. Which
pattern is this?
A. Observer
B. Mediator
C. Chain of Responsibility
D. State

Answer: A

18. A text editor stores snapshots of its state before each edit. Which pattern supports this?
A. Command
B. Memento
C. Strategy
D. Chain of Responsibility

Answer: B

19. Why does the Strategy Pattern promote flexibility in algorithm usage?
A. It centralizes algorithm logic
B. It allows algorithms to be interchanged dynamically
C. It reduces dependency between classes
D. It eliminates the need for abstract classes

Answer: B

20. How does the Chain of Responsibility Pattern handle requests?


A. By broadcasting requests to all handlers
B. By delegating requests through a chain until one handles it
C. By aggregating multiple handlers into one class
D. By assigning handlers at runtime

Answer: B

21. Why is the layered architecture often used in enterprise systems?


A. It separates concerns, making maintenance easier
B. It minimizes latency between layers
C. It eliminates the need for middleware
D. It allows direct communication between layers
Answer: A

22. Why is the Singleton Pattern avoided in some systems?


A. It is hard to implement
B. It violates single responsibility principle
C. It reduces code reusability
D. It increases memory usage

Answer: B

23. A banking app uses microservices to handle transactions, each with its database. What is
this approach called?
A. Distributed Architecture
B. Client-Server Architecture
C. Event-Driven Architecture
D. Layered Architecture

Answer: A

24. Which pattern enables dynamic addition of responsibilities to objects?


A. Decorator
B. Bridge
C. Composite
D. Flyweight

Answer: A

25. Which pattern provides a simplified interface to a set of subsystems?


A. Facade
B. Proxy
C. Adapter
D. Bridge

Answer: A

26. Which behavioral pattern is ideal for implementing a state machine?


A. Strategy
B. State
C. Observer
D. Chain of Responsibility

Answer: B
27. A system delegates responsibility to multiple handlers until one processes a request.
Which pattern applies?
A. Chain of Responsibility
B. Observer
C. Proxy
D. State

Answer: A

28. An e-commerce platform allows users to undo multiple steps. Which combination of
patterns works here?
A. Memento and Command
B. Strategy and Observer
C. State and Chain of Responsibility
D. Flyweight and Adapter

Answer: A

29. Why does the Builder Pattern improve object construction?


A. It separates construction logic from representation
B. It reduces the number of constructors
C. It uses shared state to save memory
D. It supports runtime polymorphism

Answer: A

30. Why is the Mediator Pattern used in complex systems?


A. It reduces dependencies between communicating components
B. It simplifies user interface design
C. It improves memory usage
D. It enhances security through encapsulation

Answer: A

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy