posted 15 years ago
Hi,
As some people have already pointed out in other posts, the relationships between StandardCigar, PetiteCigar, FlavoredCigar and CigarManufacturer is many-to-many. This raises several issues:
A many-to-many relationship like this works fine for the components of a final product but it doesn't really fit for a finished product like a cigar. The many-to-many relationship implies that Big Smokes only sells generic cigars. For example, when I buy a standard cigar I'll have no idea who made it until it arrives on my doorstep. Clearly this isn't a very sensible business model. For example, people don't go into a shop and ask for a packet of cigarettes, only to leave the choice of brand up to the salesperson.
An alternative interpretation of the business model is that StandardCigar, PetiteCigar, and FlavoredCigar all relate to product categories, as opposed to individual saleable items. This makes far more sense.
Also, I think it's safe to assume that the perspective of the domain model class diagram supplied by Sun is conceptual, rather than specification or implementation. This gives us some leeway in how we interpret it's contents.
What are other peoples' thoughts on this?
Regards,
Jonathan
SCJP, SCWCD, SCBCD, SCEA 5