For the below relation between Container
and Component
in java.awt
class hierarchy, I see that,
in addition to is-a
relation, class Container
has composite relation with class Component
with below line of code,
/**
* The components in this container.
* @see #add
* @see #getComponents
*/
private java.util.List<Component> component = new java.util.ArrayList<Component>();
But am still not clear with the below diagram wrt operation()
method.
So,
1) What does class Leaf
and class Composite
signify in the below diagram?
2) What exactly are we depicting about operation()
method in class Leaf
and class Composite
as per the below diagram?
Note: I am java beginner learning java
Aucun commentaire:
Enregistrer un commentaire