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.
You might also like to view...
To set a red color for the text in the label lbl, use _________.
a. lbl.setFill(Color.red); b. lbl.setTextFill(Color.red); c. lbl.setFill(Color.RED); d. lbl.setTextFill(Color.RED);
If you want to animate an airplane moving across a static background, how many layers are required?
What will be an ideal response?
A master page enables the users to create the layouts of the pages quickly and conveniently across the entire Web site.
Answer the following statement true (T) or false (F)
A single episode of a podcast series is called a(n) ____________________.
Fill in the blank(s) with the appropriate word(s).