Do I have this Use Case diagram correct? - uml

With this Use Case diagram, I'm unsure if I'm currently doing it correctly or not. Checked online and each site is giving me a different answer. I just need a direction or someone to correct me.

This is interesting as I am currently going through the exact same discussion with a client...
I would say "no" simply because I am unsure of what this actually represents.
A use case must bring a benefit to a user, and I really don't this in this diagram. What does Actor0 actually trying to accomplish? I do not get this from the diagram.
Did you write down statements before trying to do this? I find that going to a whiteboard and writing down what your actor's goal and how you see this happening so that the actor achieves the goal is a good start to better understanding the use case and differentiate the system being built from external systems. One way to do this is through a set of user stories (or use case slices).
And answering Thomas Kilian's excellent questions will also help you in this task!
Also, you are doing something that I see too often from people starting with use cases (and sometimes with UML experience): use case decomposition as a set of actions - basically trying to model a set of activities by breaking it down. Doing that is typically the second step in your analysis (e.g., by using activity and sequence diagrams).

No. Only "Register" (what?) and "Add/View Details" (which?) can be regarded as use cases since they add value. Neither "Login" nor "Main Menu" are use cases. The first is a constraint and the second an implementation detail.

Related

Which use case relation to use between main use case and different options

I have a question related to Use Case diagram for a mobile app and charging.
So let's say My use case is Set Charging mode. Charging mode can either be Immediately or Scheduled Later. What Relationship should be between the Set Charging Mode UC and the two different options?
I have thought about using Generalization but I am not 100% sure this is correct.
Not knowing much about your context, I nevertheless understand that "Set charging mode" is not really a user goal: it's not a set of behaviors with observable results of value for the user. As such it should not be a use case.
In principle, "Set charging mode" would be part of the description of the real use case (e.g. getting something for which the user will be charged). Or maybe you'll specify the expected behaviors in a separate activity diagram.
If I'd be wrong, or if despite the advise you'd opt for a use case, the use case should require a choice, and a mutually exclusive one. This would be part of description of the use case Set charging mode, or indicated as a comment for the use case.
If I'd still be wrong and if you'd really really want to show two use cases, you could indeed either have two specific extensions to the choice or consider specialization. However, from your description, I still understand that these use cases would not be independent (Set charging mode or Set charging mode to later make no sense on their own). Moreover they seem far too detailed for a use-case. I'd therefore really advise not to follow this way keep UC for the big picture and avoid getting lost in details better documented elsewhere.
To complete Christophe's answer, you have to keep in mind 2 things (at least):
the purpose of a use case diagram is to help you in the specification of the problem and later in programming
UML does not define a level of granularity for a use case except the famous 'observable and tangible goal' but to help you, keep in mind that a use case is detailed with an activity diagram (among others). In your case, the corresponding activity diagram would contain ONE action

Is my use of inheritance and extended stereotype correct in this Use Case

The use case should depict this situation:
A shipman can ask questions via radio to either a VL, DM or WL. Depending on the question, they need to look it up in APIC (a software tool), but this is not always the case. They all are apic operators, but depending on their role, they have their speciality that they only can access in apic.
The question the shipman asks can be about lock executions, the nautical weather, etc... but it all comes down to the same question-answer format.
Is my use case correct?
Asking a question is usually not a use case. The goal of the shipman is probably not to ask a question, but to get some answers. So asking and anwering is one use case.
When analysing the use case, several possibilities will show up, such as looking up information in the APICS-system. I would just describe this within the use case (possibly with an Activity Diagram). What is the advantage of using an extend here? (I agree with the other answer, that the arrow is in the wrong direction. Additionally it should be an open arrow).
Each goal is an own use case, even when they have much in common. After describing the essential steps of the use cases, it may save some work to look at them and find those that have a big overlap in the essential steps and then create an abstract use case containing the commonalities. But this should only be done after describing the use cases.
Always remember, that the main goal of use case analysis is to find all functional requirements for the system, especially those that are not immediately obvious. If your use cases are just wrappers of functions you already know, not much insight is gained by them.
Three issues here:
The extends arrow is the wrong way around.
Generalizations of UCs is a bad idea in general.
Just as a side note: your actors miss their legs. This way it's a Female symbol (Venus' mirror).
Let's elaborate a bit on the 2nd. Why is it a bad idea? UCs represent a single added value for an actor a system under consideration will deliver. So each UC is unique (think of unique sales propositions). Generalization of USP is only valid in a franchise. So unless you model McDonalds here, it's likely a wrong approach. Look at the main UC "ask question". Do you consider that added value from a system? I wouldn't. When looking at the bubbles behind they more look like primary use cases. So, just remove that general "ask question" and connect the bubbles behind directly with Shipman.
As always when it comes to UC questions: Bittner/Spence about UC is the best read I can recommend.

Proper way to design Use Case Diagram

[Original Title] : Does an actor need to point directly in use case diagram?
or can I do it like this?
in this Use Case Diagram, I want to say that actor can use any use case in the pointed group-of-use-case.
does this kind of thing allowed?
Edit #1
The reason why I ask this question, is because when I create this use case there's a lot of line intersecting each other that makes me confuse.
And there's a comment :
It would be better to split that into smaller diagrams
does it mean like this?
Edit #2
after reading comment :
A UseCase specifies a set of actions performed by its subjects, which yields an observable result that is of value for one or more Actors or other stakeholders of each subject.
so I decided to change to this :
is this how a use case diagram should be?
Edit #3
CONCLUSION
An actor should point directly to use case
Read more the detail about how a Use Case Diagram should be in comment on this question
To be UML compliant you can not do that. But I guess one can understand what you are trying to communicate.
As a side note: Login is not a business use case. It is a constraint. Also with CRUD use cases I would not separate them but have a Maintain <object> instead (which itself is some borderline use case since maintaining something is not directly business relevant). You can constrain maintenance operations to certain actors separately.
Edit Regarding Login (one of my favorites): Use cases are most commonly used to describe business context (exactly as you are doing). So when looking from a business perspective, a Login is not a use case, but a simple constraint (you can do the business relevant things only when you are logged in).
Now for the Manage/Maintain use cases. They are on a similar level. Usually the "managing" itself is not directly business related. In many cases the focus on the real business was lost. So instead the reason why you manage something is the real use case (e.g. Correct User Data, Collect User Data). This is quite challenging and I confess that sometimes I also fall back to Manage. Most people don't bother but doing a good job requires to think over basics and not adopt bad habits.

Use Case based on Activity Diagram

I wonder if anyone can assist me, I am trying to do a use case diagram from the activity diagram that I drew but I am not very good in use case diagram; can anyone guide me if what I did here is correct please.
You can see the diagrams at this link:
http://imageshack.us/photo/my-images/857/activitydiagram.png/
http://imageshack.us/photo/my-images/816/usecase.png/
Thanks in advance.
Some background first.
Activity & Use Case Diagrams usually depict behaviour. Activity Diagrams usually describe a process (or a linked sequence of activities). Yours doesn't really do that. That's OK - as long as the diagram works for you that's fine.
It's also normal to design an Activity Diagram as the process to realise a Use Case. You're asking to go the other way. Again, not conventional - but not impossible.
Use Cases are normally written as verb statements and describe actions a User would want to perform (e.g. "purchase book", "checkout"). Yours are nouns.
OK - so to your question.
Identifying the Use Cases involves asking the question: "What can Users do?". Looking at your Activity Diagram, I'd guess the Use Cases would be something like:
Take a Picture [with Camera]
View Photos
View Map
View Current Location on Map
Each of those would be a Use Case. There are probably others (what can a User do with Favourites?) but that should give you the idea.
hth.

Would you show things an Actor cannot do on a Use Case diagram?

On a Use Case diagram can you show things that an actor cannot do, for example because they won't have permissions to do it?
Or is it just implied due to the fact that they won't have a line joining them to the particular use case?
If the Use Case you are diagramming is the case where an actor attempts to do something that is not permitted and is then denied, then yes, I would show it.
Otherwise, I would stick to only including things that are actually part of the use case.
No. An Actor would be connected to everything that he can do. If the Actor can't do it, then it's not shown.
This is what alternate paths are for. The basic path (a.k.a. happy path) will show what happens when the correct Actor initiates the Use Case. In the alternate paths you can show what happens if the wrong Actor attempts to initiate it.
You might model Role actors that can do the task. You could then have another use case that has the original actor attempting to acquire the given Role.
IMHO this question and most of the answers give a wrong impression about the way use cases should be used.
Use case was intended as a requirements technique that uses natural language. It is most and quite effective that way.
It can be a thoroughly destructive technique when it is combined with too much UML/modeling. Structured modeling of use case texts for example by modeling main and alternative flows using UML Activity Diagrams is a tried and tested way for example to create Use Cases of Mass Destruction.
A use case diagram can be useful but we should remember the purpose of use case as a technique which is first and foremost to identify the user goals a system should support. Subsequently we can capture more details using natural language in use case texts using main flow, alternative flows etc.
Using diagramming tools we can visualize some simple information:
- For each user goal we can create model element type Use Case.
- Show system boundary using a box for the system with use case elements in it.
- Create a relationship between actor and use case to show the actor has a particular goal against the system.
Keeping an up-to-date list of actors mapped to goals is however of secondary importance. Doing a stakeholder analysis, drawing up lists of actors is a means to identify the users goals. After user goals have been identified it is strictly speaking not longer necessary to keep the lists of actors around.
If we are asking questions about how to put user permissions in a use case model we are most likely trying to capture too much information. We should abstract model elements away so that the model does not try to answer/capture these type of detailed design questions.

Resources