Redirected
recategorized by
1,466 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
recategorized by

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".

 

Related questions

2 votes
2 votes
3 answers
2
Pooja Khatri asked Jul 13, 2018
2,755 views
Match the following in Software Engineering :$\begin{array}{clcl} &\textbf{List-I}& & \textbf{List-II} \\ \text{(a)}& \text{Product Complexity} & \text{(i)} & \text{Soft...
1 votes
1 votes
4 answers
3
Pooja Khatri asked Jul 13, 2018
1,733 views
Which one of the following is not typically provided by Source Code Management Software?SynchronizationVersioning and Revision historySyntax highlightingProject forking
0 votes
0 votes
3 answers
4
Pooja Khatri asked Jul 13, 2018
2,000 views
A software system crashed 20 times in the year 2017 and for each crash, it took 2 minutes to restart. Approximately, what was the software availability in that year?96.99...