Implemenation of 'may be used' in Use case diagram - uml

A case diagram has use case "Manage shopping cart". I need to add "View purchase" which used use case "Manage shopping cart" and add "Delete item" which may be used by use case "Manage shopping cart".
My attempt is here: Link
But I am not sure with my implementation of: "which may be used by use case" and orientation direction.
Is that correct?

Obviously, the sentence should be: "which may be used BY use case...". I have edited the question. That can be realized by extend arrow, as you have drawn it.
As for your diagram, it lacks arrows from customer to view content and to delete item. The customer can use these operations, can't he?

Related

UML use case diagram check user rights

I'm currently writing an use case diagram for a module project for work. Basically, the project has one actor (the user, which is an employee). An example of one use case without anything special would be Add slide to slideshow. However, the slideshow has an website ID. So in order to be able to add a slide to the slideshow, the user has to have rights to that website.
I don't quite remember how I should add that to my diagram. I thought of this first:
But I'm not sure if this is done correctly. If not, how would I add the check that in order to Add item, your rights have to be checked first?
No, that's not correct. Authorization is no use case since it adds no value to what the actor is doing. It's a simple constraint and can be attached to either the actor ({must logged on for Add Item}) the UC ({User must be logged on}) or the association ({login required}).

UML Activity Diagram for android project

I have created the below diagram and I wanted to know if the diagram that I have done is correct.
The below diagram is based on an android application. When the application loads the user is given 3 button to select add, update and help. On click on add button the user is given an option to add a new user or add a new item. When he select either of the options he enters the required data once the data is entered the system check if all the values are entered correctly and then finally saved. The same process is applied for update.
Your diagram misses an entry point. Though it's rather obvious that the top action is the start, only the entry point is the one indicating the beginning.
You can omit most of the diamonds and directly transfer via a guard from actions. So your conditions should be guards and written as [Yes] or [No]. The top most action (and quite some others) is(/are) indeed what should be written inside (or aside) the diamond below.
An excerpt for an update could look like this:
Finally Values added does not look like an action but rather as state. It should be omitted. Alternatively use differently named end flows.
So far for the formal points. But as #eyp said: it's a good one and one can understand what you tried to express. The above is just for the picky teachers.
It's a good one but it lacks some detail in the diamonds. You should write besides the diamon the question before choosing the next setp to do.
For example in the diamond after Check update value you may write is valid? or another question that clarifies more the business logic.

How can I draw a use case diagram for multiple user privilege?

I'm try to draw a use case diagram for Human Resource Management System. I have 3 types of users which are Admin, Supervisor and Employee.
Let say:
Example 1:
Admin can access a complete employee management function which can add, edit, view and so on while supervisor can only view the employee information.
Example 2:
In Leave Management, Admin can configure leave but he cannot apply leave while supervisor can't configure leave but he can apply leave and view his leave history.
I'm trying to create a top level use case like employee management and its sub function (add, edit, view, ...) is extend to it. But when I try to connect Supervisor to employee management, I stuck and it is kinda weird if it is connection directly to "view employee" use case which is extend from "Employee Management" use case.
In "Leave Management" use case is more confusing, because Admin and Supervisor have different action as I mentioned at above.
Any suggestion or solution to me? Sorry for my poor english
You have to cut out our use cases according to each role as depicted below.

How do I show relationships in Enterprise Architect

I have used Enterprise Architect to create a simple class diagram. What I can't figure out how to do is make it show the relationships such as 1 to 1, etc...
Seems like a simple thing to show, but this program is not user friendly at all.
It is fairly simple actually - for both Class and Object diagrams you can use "Associate" from the toolbox. Then if you double click the association, you will be able to enter multiplicity under "Source Role" and "Target Role" tabs.
When you draw two classes and put association connector between them, you should right click the association, you will see multiplicity, but you should do this work in near of any class on the line of association.
In the association properties dialog go to target and source role sections.
There you'll find the multiplicity fields to fill in.
You can also right click near the ends of the association on a diagram and select "multiplicity" from the context menu.

UML: how to represent use case extension for two actors

Imagine you have one use case "register contract" and one extension "attach document". The two actors are not related at all (I mean, one of them do not extend the other one); both can register a contract but only the "client" can also attach documents.
How do you represent that? Is my example right or should I trace a line from the client to the "register contract" use case too?
In this case I would use two diagrams, one per actor
Create two different use cases, one for the employee ("register contract") and one for the client, and in the client ("extended register contact" or something like that). If you want to show that both use cases are related you can add use inheritance between them.
Another option is to add a parent to both client and employee inherit from a common parent which activates the use case, and add a comment to the <<extends>> link stating that the extension can only be called if the caller is a client (see the example shown here)

Resources