Software Architecture & Design Patterns Flashcards
6 cards from real B.S.W.E. Bachelor of Software Engineering practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Software Architecture & Design Patterns flashcards as text
What design pattern ensures only one instance of a class exists?
Answer: Singleton
The Singleton pattern restricts instantiation of a class to a single object throughout the application lifecycle.
Which architectural pattern separates an application into Model, View, and Controller?
Answer: MVC
MVC divides application logic into Model (data), View (UI), and Controller (business logic) components.
What pattern allows incompatible interfaces to work together?
Answer: Adapter
The Adapter pattern converts the interface of a class into another interface that clients expect, enabling compatibility.
Which design pattern defines a skeleton of an algorithm in a base class?
Answer: Template Method
The Template Method pattern defines the program skeleton in a base class while allowing subclasses to override specific steps.
In microservices architecture, what is the primary benefit of service decomposition?
Answer: Independent deployability
Microservices allow each service to be independently developed, deployed, and scaled without affecting other services.
Which pattern encapsulates a request as an object to support undoable operations?
Answer: Command
The Command pattern encapsulates requests as objects, allowing parameterization, queuing, logging, and undo operations.