All pastes #31585 Raw Edit

Miscellany

public text v1 · immutable
#31585 ·published 2005-11-28 20:40 UTC
rendered paste body
which the better object model?

IMPLEMENTATION 1:

class A
{
    int someField;
    B reference;
}

class B
{
    int someOtherField;
}

IMPLEMENTATION 2:

class A
{
    int someField;
}

class B
{
    int someOtherField;
    List<A> references;
}