Can someone give me the name of the following OOP concept (if it is indeed, an OOP concept at all!):
I have two classes: A & B. Both have say, 2 methods each (all different). Now I create a third class, C. Now I want to expose all of A & B's methods to C. Here is some sort of demonstration:
class A
int method_in_A_one() {
}
int method_in_A_two() {
}
end
class B
int method_in_B_one() {
}
int method_in_B_two() {
}
end
class C
C() {
A an_instance_of_a;
B an_instance_of_b;
}
}
Now I want to be able to do this:
C instance_of_c = new C;
insance_of_c.method_in_A_one();
insance_of_c.method_in_A_two();
insance_of_c.method_in_B_one();
insance_of_c.method_in_B_two();
I don't really have a use for this yet, but I'm sure theres a specific concept dealing with it. Thanks in advance, ell.