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

Software-design

Question 17

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

A
adapter
B
decorator
C
delegation
D
proxy
Question 17 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 17 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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!