Suppose I have two classes
class A
{
b bInstance;
public A ( b newb )
{
this.bInstance = newb;
}
}
class B
{
// some data and methods go here
}
class List<A>
{
// list of A objects also holding reference to a B object
}
For every one object of A, there is a related object B.
Now I want to do some operations on data from class A & B, is it better to create a new class or do the operations in Class A or in the collections class?
EDIT:
I need to use data from Class A and use it with data of Class B to create an end result. The data is seperate, so I don't want to merge them in one Class. That wouldn't make sense.
Mostly string operations, as data is string data.
What is the best design practice for this? If there is one?