โ† All CPP Flashcard Decks

Design Patterns & Software Architecture Flashcards

6 cards from real CPP practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Design Patterns & Software Architecture flashcards as text
  1. What is the Command design pattern?

    Answer: A pattern that encapsulates a request as an object, enabling undo/redo, queuing, and logging of operations

    The Command pattern wraps a request with all necessary information as an object, decoupling the sender from the receiver.

  2. What is the Facade design pattern?

    Answer: A pattern that provides a simplified interface to a complex subsystem

    The Facade pattern hides subsystem complexity behind a simple interface, reducing coupling between clients and complex internals.

  3. What is the Builder design pattern?

    Answer: A pattern that separates the construction of a complex object from its representation, allowing step-by-step creation

    The Builder pattern uses a fluent step-by-step API to construct complex objects, avoiding telescoping constructors and improving readability.

  4. What is the principle of 'separation of concerns' in architecture?

    Answer: Dividing a program into distinct sections where each section addresses a separate concern

    Separation of concerns reduces complexity by ensuring each module has a clear, distinct responsibility with minimal overlap.

  5. What is a service mesh in microservices architecture?

    Answer: A dedicated infrastructure layer handling service-to-service communication, including load balancing, auth, and observability

    A service mesh (like Istio or Linkerd) injects sidecar proxies alongside services to manage cross-cutting communication concerns transparently.

  6. What is the Proxy design pattern?

    Answer: A pattern providing a surrogate object that controls access to another object

    The Proxy pattern acts as an intermediary for another object, adding access control, lazy loading, logging, or remote access transparently.