There are two classes:
Class A{
private:
int data;
public:
A(B b) {data=b.do_something()}
};
and
Class B{
public:
int do.something(){.....};
};
An object of Class B
helps to make some job to Class A
in the constructor or, alternatively, as a local variable in methods. Objects of Class B
are never Class A
members. How to call such kind of relationship? That is neither Association, nor Aggregation, nor Composition as far as I understand.