2018 July 22 NTA UGC NET Paper 1
December 1, 2023
Software-Engineering
December 1, 2023
2018 July 22 NTA UGC NET Paper 1
December 1, 2023
Software-Engineering
December 1, 2023

Software-Engineering

Question 252
A software design pattern often used to restrict access to an object is :
A
adapter
B
decorator
C
delegation
D
proxy
Question 252 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 252 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!!