posted 13 years ago
Hi guys,
as I'm finalizing my assignment solution I got this doubt that I need some help clearing it.
I've got a SFSB that represents a shopping cart, and I've added an entity bean that represents an order. each of these two classes has its own relations to other objects, what I'm thinking about is if I can remove the shopping cart class and consider a shopping cart an instance of Order class that is not yet paid for (or persisted), and do the needed changes to the type of this class so it can be persisted, would you consider this as good condensed design approach?
I feel that keeping two classes for shopping cart and order is redundant to some extent: they both share similar qualities and functionalities, although also keeping them separate is a practice of separation of concerns.
what do you think guys?
SCJP 5 (80%), SCWCD 5 (85%), SCBCD 5 (80%), CAPM, SCEA/OCMJEA