.

Wednesday, February 27, 2013

Design Pattern

* Convert the embrasure of a partitioning into another interface clients expect. Adapter lets classes work together that couldnt otherwise beca economic consumption of irreconcilable interfaces.

These ill-matched classes may come from different libraries or frameworks.

participants
    The classes and/or objects alive(p) in this kind are:
* Target   (ChemicalCompound)
* defines the domain-specific interface that thickening uses.
* Adapter   (Compound)
* adapts the interface Adaptee to the Target interface.
* Adaptee   (ChemicalDatabank)
* defines an existing interface that involve adapting.
* Client   (AdapterApp)
* collaborates with objects conforming to the Target interface.

The adapter pattern is a material body pattern that is used to allow two in congruous types to communicate. Where one class relies upon a specific interface that is not implemented by another class, the adapter acts as a translator between the two types.
This is a structural pattern as it defines a manner for creating relationships between classes. The adapter design pattern is used to provide a link between two otherwise incompatible types by wrapping the adaptee with a class that supports the interface required by the client.

Ordercustompaper.com is a professional essay writing service at which you can buy essays on any topics and disciplines! All custom essays are written by professional writers!



The UML class draw above describes an implementation of the adapter design pattern. The items in the plot are described below:
* Client. The client class is that which requires the use of an incompatible type. It expects to interact with a type that implements the ITarget interface. However, the class that we desire it to use is the incompatible Adaptee.
* ITarget. This is the expected interface for the client class. Although shown in the diagram as an interface, it may be a class that the adapter inherits. If a class is used, the adapter must lift its members.
* Adaptee. This class contains the functionality that is required by the client. However, its interface is not compatible with that which...If you want to get a full essay, order it on our website: Ordercustompaper.com



If you want to get a full essay, wisit our page: write my paper

No comments:

Post a Comment