There are three classes A, B and C. An object of class B is passed as a parameter to a method in class A. An object of class C is created in class B as private member. The relation between A, B and C are:
A. B aggregates A, and C aggregates B
B. B aggregates A, and C composed of B
C. A aggregates B, and B is composed of C
D. A is composed of B, and B aggregates C
Answer:C
There are three classes A, B and C. An object of class B is passed as a parameter to a method in class A. An object of class C is created in class B as private member. The relation between A, B and C are:
A. B aggregates A, and C aggregates B B. B aggregates A, and C composed of B C. A aggregates B, and B is composed of C D. A is composed of B, and B aggregates C