• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Shopping Cart / customer In Cade's Diagram  RSS feed

Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know why there is an association between the shopping cart and the customer in cade's diagram?

IMO the shopping cart can/does exist without the customer (the customer only has to logon when he/she wants to process the order..??);
Also, the customer does not need to have a reference to the shopping cart.

Only the order-processor needs to know about the shopping cart, and about the customer.

Or is some customer data also stored in the shopping cart? but, I cannot find any prove of this in the other diagrams...

Can somebody explain this?

[ January 22, 2005: Message edited by: Josep Andreas ]
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Becuase without a customer a shopping cart doesnt exist.
The association is required becuase eventually a shopping cart belongs to a customer.
And if u have the customerId u can retrieve cached shopping carts if need be the case. Dont know how viable that is in a scalable solution though.

Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am also confused. I don't think two separate classes Order and ShoppingCart are needed.

If ShoppingCart is needed then it should associate itself with the product and then with Order.

It is definitely not a SFSB otherwise he would have depicted that. It doesn't look like composite entity because Order is already there.

See not every class in the class diagram will become entity bean. So it could be some value object used for holding product and customer reference in session.

I am not convinced as to why it is needed otherwise..

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!