Using examples, illustrate the different types of adaptor needed to support sequential composition, hierarchical composition and additive composition.

What will be an ideal response?

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.

Computer Science & Information Technology

You might also like to view...

What is the name for the activity in which a project manager specifies which items are subject to configuration control?

A. Specification B. Identification C. Targeting D. Classifying

Computer Science & Information Technology

For a 3D graphic, the instructions contain the locations and lengths of lines that form a(n) ____________________ for a three-dimensional object.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology