Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User class in class diagram

 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anyone show the User class in the class diagram? If so, was it disconected from other classes (like Petstore) or was it associated with Customer ?


Thanks! Regards
 
Ricardo Ferreira
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't use an User class in my assignment, but i could think in a usage of this class as an generic type for every single class that could perform login/logout at the system. For example:

class User { userName, password }

Customer extends User ...
TraveAgent extends User ...

This means that you can use a 'is-a, kinf-of' mechanism with the authenticated classes, and provides an unique point of authentication based in the User class; an generic authentication mechanism.
 
Santiago Urrizola
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i use User in my diagrams. user has credentials to login to the system. and all basic information for secturity porpouse.
 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i use User in my diagrams. user has credentials to login to the system. and all basic information for secturity porpouse.



Ok, did you connected the User class with Customer or have you made like the Petstore (User class disconnected, without any connection to any class) ?

Regards
 
Santiago Urrizola
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i represent thay with a generalization (class hierarchy)
 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks for you answer.

So you probably have a "Travel Agent" class in your diagram. I�m not confident with this approach because:
-The TravelAgent class won�t have any association with anybody.
-Who are going to register the TravelAgent? Your application? How would you know if it�s a Customer or a TravelAgent?
-A TravelAgent entity would be useless (except for logging, but for this case we can have a User class associated to 0 or 1 Customer and then you can use the user�s username for logging).

Any comments?

Best Regards
[ July 13, 2006: Message edited by: Samuel Pessorrusso ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic