0% found this document useful (0 votes)
8 views

Exercise for Software Architecture and Design

The document contains a series of multiple-choice questions focused on software architecture and design principles, including architectural styles, design patterns, and their benefits. Key topics include layered architecture, microservices, and various design patterns such as Singleton, Factory Method, and Observer. Answers to the questions are provided, along with explanations for each correct choice.

Uploaded by

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

Exercise for Software Architecture and Design

The document contains a series of multiple-choice questions focused on software architecture and design principles, including architectural styles, design patterns, and their benefits. Key topics include layered architecture, microservices, and various design patterns such as Singleton, Factory Method, and Observer. Answers to the questions are provided, along with explanations for each correct choice.

Uploaded by

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

Exercise for Software Architecture and Design

1. What is the main goal of software architecture?

A. To write efficient algorithms


B. To organize code for easy debugging
C. To define the high-level structure of a software system
D. To minimize the use of memory

2. Which of the following is not a common software architecture style?

A. Layered
B. Client-server
C. Object-oriented
D. Pipe and filter

3. In a layered architecture, which layer typically handles the business logic?

A. Presentation Layer
B. Application Layer
C. Data Layer
D. Network Layer

4. What is a key benefit of using design patterns in software design?

A. They make the code run faster


B. They provide tested solutions to common design problems
C. They increase the size of the codebase
D. They avoid the need for testing

5. Which of the following best describes modularity in software design?

A. Designing software to work only on specific platforms


B. Separating functionality into independent, interchangeable modules
C. Reducing the number of user interface screens
D. Writing code in multiple programming languages

6. Which design pattern is best suited for creating objects without specifying
the exact class of object that will be created?

A. Singleton
B. Factory Method
C. Adapter
D. Observer

7. Which pattern ensures a class has only one instance and provides a global
point of access to it?

A. Builder
B. Prototype
C. Singleton
D. Command

8. The Adapter pattern is used to:

A. Convert the interface of a class into another interface clients expect


B. Compose objects into tree structures to represent part-whole hierarchies
C. Add new functionality to objects dynamically
D. Provide a simplified interface to a complex system

9. Which pattern would you use to allow multiple objects to listen and react to
events or changes in another object?

A. Strategy
B. Decorator
C. Observer
D. Facade
10. Which design pattern is used to separate the construction of a complex
object from its representation so that the same construction process can create
different representations?

A. Builder
B. Proxy
C. Flyweight
D. Bridge

11. What is the primary purpose of the Strategy pattern?

A. To delegate responsibility to multiple helper classes


B. To provide a way to access elements of a collection sequentially
C. To define a family of algorithms, encapsulate each one, and make them
interchangeable
D. To control access to another object

12. Which architectural style is best suited for applications requiring high
modifiability and independent deployment?

A. Layered Architecture
B. Monolithic Architecture
C. Micro services Architecture
D. Pipe-and-Filter Architecture

13. Which quality attribute is MOST enhanced by a layered architectural


style?

A. Performance
B. Security
C. Modifiability
D. Scalability
14. Which architectural style is ideal for systems that require streaming data
processing and high throughput?

A. Event-Driven Architecture
B. Microservices Architecture
C. Pipe-and-Filter Architecture
D. Client-Server Architecture

15. For a system that requires strong fault isolation and high availability,
which architecture is most appropriate?

A. Monolithic Architecture
B. Client-Server Architecture
C. Microservices Architecture
D. Layered Architecture

16. In which architectural style does the central component coordinate all
communication, thus becoming a potential bottleneck?

A. Event-Driven Architecture
B. Service-Oriented Architecture
C. Client-Server Architecture
D. Microkernel Architecture

17. Which architectural solution is most effective in improving system


scalability?

A. Layered Architecture
B. Client-Server Architecture
C. Event-Driven Architecture
D. Monolithic Architecture
Answers for Multiple choice Questions
1. C. To define the high-level structure of a software system

2. C. Object-oriented
(Note: Object-oriented is a design paradigm, not an architecture style.)

3. B. Application Layer

4. B. They provide tested solutions to common design problems

5. B. Separating functionality into independent, interchangeable modules.

6. B. Factory Method
Explanation: The Factory Method pattern defines an interface for creating an
object but let’s subclasses alter the type of objects that will be created.
7. C. Singleton
Explanation: Singleton restricts the instantiation of a class to a single object
and provides a global point of access to it.

8. A. Convert the interface of a class into another interface clients expect


Explanation: Adapter is a structural pattern used to bridge the gap between
incompatible interfaces.

9. C. Observer
Explanation: Observer defines a one-to-many dependency so that when one
object changes state, all its dependents are notified.

10. A. Builder
Explanation: Builder pattern is used to construct complex objects step by step.

11. C. To define a family of algorithms, encapsulate each one, and make them
interchangeable
Explanation: Strategy allows the algorithm to vary independently from clients
that use it.

12. C. Micro services Architecture


Explanation: Micro services promote loose coupling, allowing for independent
deployment and easier modification of services.

13. C. Modifiability
Explanation: The separation of concerns in layered architecture makes it
easier to modify specific layers without impacting others.

14. C. Pipe-and-Filter Architecture


Explanation: The pipe-and-filter architecture is designed for processing data
streams in a series of transformation steps, enhancing throughput.
15. C. Micro services Architecture
Explanation: Faults in one service do not typically bring down the whole
system, supporting better fault isolation and high availability.

16. C. Client-Server Architecture


Explanation: The server acts as a central coordinator, which can lead to
bottlenecks if not properly scaled.

17. C. Event-Driven Architecture


Explanation: Event-driven systems decouple producers and consumers,
making it easier to scale different parts independently.

You might also like