in IS&Software Engineering recategorized by
1,480 views
0 votes
0 votes

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

  1. adapter
  2. decorator
  3. delegation
  4. proxy
in IS&Software Engineering recategorized by
1.5k views

1 comment

ans is 4 

What problems can the Proxy design pattern solve? [2][edit]

  • The access to an object should be controlled .
  • Additional 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.

https://en.wikipedia.org/wiki/Proxy_pattern

0
0

4 Answers

2 votes
2 votes

Answer :  (4) Proxy

Reason :
 

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns.
 
These design patterns are all about Class and Object composition. Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality.
 
  • Adapter
    Match interfaces of different classes
  • Bridge
    Separates an object’s interface from its implementation
  • Composite
    A tree structure of simple and composite objects
  • Decorator
    Add responsibilities to objects dynamically
  • Facade
    A single class that represents an entire subsystem
  • Flyweight
    A fine-grained instance used for efficient sharing 
  • Private Class Data
    Restricts accessor/mutator access
  • Proxy
    An object representing another object 
A Proxy can also be defined as a surrogate. In the real work a cheque or credit card is a proxy for what is in our bank account.  It can be used in place of cash, which is what is needed, and provides a means of accessing that cash when required. And that's exactly what the Proxy pattern does - controls and manage access to the object they are "protecting".

 

1 vote
1 vote
answer is : Proxy
1 vote
1 vote
Option (4) Proxy
Proxy can restrict access to some objects or some websites.
0 votes
0 votes
Option (4) Proxy.

Proxies Control and manages the objects.
edited by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true