|
From: Luigi B. <lui...@gm...> - 2006-01-05 08:27:58
|
On 01/04/2006 06:07:40 PM, Naoufel El Bachir wrote: > First I wish you a Happy new year. Thank you. > Question: I am coding a hierarchy of classes for representing credit > reference names, and I am hesitating between two alternatives. I need > your opinions. >=20 > Both alternatives start with this common structure implemented using > the composite pattern: > Abstract base at the root of the hierarchy: CreditReference > Derived from it are SingleReference and BasketReference, where > BasketReference is the composite. >=20 > Now the question, would you have SingleReference as a concrete =20 > class, and every new name would be an instance of it, or would you go =20 > with an abstract class with every new name being a concrete class as =20 > it is done with currencies. Of course, in the second case I would =20 > provide some macros allowing to automate the generation of the code =20 > for new names. Hmm. It might depend. What would the interface of CreditReference look =20 like? Later, Luigi ---------------------------------------- There are no rules of architecture for a castle in the clouds. -- Gilbert K. Chesterton |