Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on Class Diagram

Lian Xiao
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How detailed should a class diagram should be? For example, CustomerManager (a stateless Session Facade) will have following method:
createUser, deleteUser, updateUser....
In User class (will be an entity bean), do I need to show above methods? I mean in the real ejb world, you use ejbcreate() for createUser, ejbRemove() for deleteUser, and setPassword() for updateUser...

However, I don't model User as EJB in the class diagram, I just model User as a business object, do I need to show createUser, updateUser, deleteUser... as operation in User class.

I do show the dependency relationship between CustomerManager and User.

Also, in the real ejb world, you won't have updateUser method in User (EJB), instead you will have call getUserByName(), then compare password you passed in and the one stored in the db, then do the updates, this all as a process and happens inside of updateUser() of ManageCustomer (stateless session fa�ade).

Another question is, what's difference between Attribute and Property, Should I model userName, password as Attribute or Property of User class?
In Together 5.5, only allow one exist.

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!