Skip to content
Sharp

Design patterns · interview question

How would you implement a Proxy pattern to control access to a remote service that calculates tax rates in an e-commerce application?

Multiple choiceHardchapter-13-curatedpremiumdesign-patternsproxy-and-adapter
Choose one answer
Answer and explanation

Correct answer

D. Create a Proxy class that implements the same interface and adds access control logic

Why

A Proxy class can be created to implement the same interface as the remote tax service, adding logic to manage access and possibly cache results to reduce service load.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →