QuizzesFacade Pattern — Concept Check
intermediate
lld

Facade Pattern — Concept Check

Questions on Facade Pattern. Provides a simplified interface to a complex subsystem, hiding its internal complexity from clients.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Facade Pattern — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer uses the OrderFacade to place an order, but the payment fails. What happens next?

    • AThe order confirmation is sent.
    • BThe stock reservation is released.
    • CThe order is placed without payment.
    • DThe shipment is created anyway.
  2. 2.In a Spring application, why should controllers call only the service layer and not repositories directly?

    • ARepositories are slower than services.
    • BServices simplify complex operations.
    • CRepositories are only for data storage.
    • DControllers can't access repositories.
  3. 3.What is the primary benefit of using a Facade pattern in a system?

    • AIt simplifies the usage of complex subsystems.
    • BIt ensures all subsystem classes are private.
    • CIt improves the performance of the subsystem.
    • DIt restricts access to subsystem features.
  4. 4.A developer mistakenly believes that using a facade pattern hides all subsystem details from clients. What is the reality?

    • AFacade pattern makes subsystems inaccessible.
    • BClients cannot access subsystem classes.
    • CSubsystem details are always hidden.
    • DClients can still access subsystem classes directly.
  5. 5.A service class in a layered architecture acts as a facade. What does it typically do?

    • AActs as a data repository.
    • BCoordinates multiple subsystem components.
    • CEncapsulates all subsystem logic.
    • DDirectly exposes subsystem internals.
  6. 6.Why might a developer choose not to use a facade pattern?

    • AIt limits direct access to subsystems.
    • BIt complicates the system design.
    • CIt hides subsystem complexity.
    • DIt adds unnecessary overhead.
  7. 7.A client application uses Spring's JdbcTemplate. What design pattern is being utilized?

    • ASingleton pattern
    • BObserver pattern
    • CDecorator pattern
    • DFacade pattern
  8. 8.What happens if the InventoryService fails to reserve stock in the OrderFacade's placeOrder method?

    • AThe shipment is created.
    • BAn exception is thrown.
    • CPayment is processed anyway.
    • DThe order is still placed.