Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem of Use Case

 
apple
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to UML. I have a question on Use Case diagram.
There are 2 kind of HR staff. The first one is manager, and the other is officer.
Manager can add, delete, and modify staff record.
Officer can modify staff record and generate report.
Then, how many actor are there?
1 actor named HR staff?
2 actors: HR Manager and HR Officer?
Also, in my project, there are many sub-functions for different kind of user. If I use the second method, this cause many actors that may have overlap function. (ie. HR Manager and HR Officer, both have the function of modify staff record)
Any suggestion!? Thank you!
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actors are roles, not titles. One human can play many roles - sales clerk, customer, supervisor, administrator, truck driver, etc. The mapping of roles to use cases should be fairly simple - not too many crossing lines. If there is some use case that every user can do (besides logon) maybe you just identified a role that every human can play.
Roles may wind up in the database to control entitlements - most users cannot play the supervisor role. Or they may have no significance beyond helping people understand who uses the system for what purpose. But don't expect your actors to wind up as classes! The system I'm on has many roles, but only one User class (which does NOT allow a User to be a Customer!)
Hope that helped.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
apple,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic