...
Computer-Organization
October 6, 2023
Mathematical-Reasoning
October 6, 2023
Computer-Organization
October 6, 2023
Mathematical-Reasoning
October 6, 2023

Software-Engineering

Question 423

A software design pattern often used to restrict access to an object is :

A
adapter
B
decorator
C
delegation
D
proxy
Question 423 Explanation: 
Proxy pattern: A class functioning as an interface to another thing. In the proxy, extra functionality can be provided, for example caching when operations on the real object are resource intensive, or checking preconditions before operations on the real object are invoked.
→ For the client, usage of a proxy object is similar to using the real object, because both implement the same interface.

→ Proxy pattern solve the access to an object should be controlled and functionality should be provided when accessing an object.
→ When accessing sensitive objects, for example, it should be possible to check that clients have the needed access rights.
Correct Answer: D
Question 423 Explanation: 
Proxy pattern: A class functioning as an interface to another thing. In the proxy, extra functionality can be provided, for example caching when operations on the real object are resource intensive, or checking preconditions before operations on the real object are invoked.
→ For the client, usage of a proxy object is similar to using the real object, because both implement the same interface.

→ Proxy pattern solve the access to an object should be controlled and functionality should be provided when accessing an object.
→ When accessing sensitive objects, for example, it should be possible to check that clients have the needed access rights.

Leave a Reply

Your email address will not be published. Required fields are marked *