+2 votes
in Software Engineering by

1 Answer

+1 vote
selected by
Best answer

To illustrate the different types of adaptor needed to support sequential composition, hierarchical compostition and additive composition:

1. In sequential composition, Component C is created by composing A and B in sequence i.e. A; B. For example, in an object oriented system, the code of C would be implemented as a call to method A in object class X followed by a call to method B in object class Y.

2. In hierarchical composition, Component C is created from Component A calling component B. In an object oriented program, component C could be a method that calls a method X.A. Within X.B, there is a call to Y.B.

3. In additive composition, Component C is created by integrating the interfaces of component A and component B to create the interface of component C. In an object oriented program, this would be implemented by creating a new class C, which includes the interfaces of classes A and B.

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that


If you Google search "Chuck Norris getting his ass kicked" you will generate zero results. It just doesn't happen.