In my particular problem domain, I have distilled the problem to an interface which is realized by two abstract classes.
In IMeasurement, I have identified behaviour that is common to all "Measurements". The two abstract classes "MeasurementA" and "MeasurementB" implements the common interface. For this discussion, let's ignore MeasurementB. Each "Measurement" is done for a Person or a Couple (Two Persons). Thus "Single" is the implementation class for one Person. And "Doubles" is the implementation class for a Couple (Two Persons). That is the only difference between the two.
What do you think of this design ? Should I even need to have distinct Single/Doubles ? I'm thinking of combining Single and Doubles and just have overloaded constructors/factories. I forsee, however, that Clients of the class will need to know if it is for a Person or a Couple e.g.
[ February 22, 2005: Message edited by: Pho Tek ] [ February 22, 2005: Message edited by: Pho Tek ]