sequence diagram used as a use case - uml

Has anyone ever seen a sequence diagram used as a use case? I never have and it really twists my head. At my current company, in all the documentation and discussions, the term "use case" is used to label a sequence diagram. I've asked a couple of times about this practice and get funny looks like it is a normal thing to do. - I've been a software engineer for a long time and used UML since the late 1990's when it was first (fairly) widely talked about. I don't expect to change the company culture. I'm just asking if this practice is used anywhere else and associated comments. - Thanks.

In my university, we learned that a use case diagram and a sequence diagram are both different diagrams with different meanings. In my experience, I have never heard anyone calling a sequence diagram a use case diagram or vice versa so I guess it's just the company culture...

Sequence Diagrams are typically used to describe an example of an action flow with communication. Thus Sequence Diagrams are very well suited to display an example for a use case. For this reason it is normal to refer to such a diagram as "a use case".
In consequence you would draw multiple Sequence Diagrams for each Use Case

Related

UML of use case diagram correct? Extension or generalization?

I have been trying to understand it but I couldn't. Can someone explain this shortly? Is there some problem with this UML diagram? If there is, where?
I thought that instead of extending arrows there might be a generalization for the pic, video, tag names, and feeling use cases. And I think that included arrows should have been dashed. Are these true? Thank you already.
You can not understand this since it is absolute nonsense. This is some semi-activity diagram. A use case is about actor goals, not how to do something. Please give the author of that a heavy kick in the rear. Or if you not that rude as myself (being a pacifist with empasis on fist - haha) just encourage them otherwise to start learning about use cases.
As always I recommend reading Bittner/Spence about use cases.
The following aspects of the diagram violate the UML specifications:
The boundary box shall represent a system (e.g. Facebook), not a function (Add Status).
Keywords include and extend shall be written in guillemets: «include», «extend».
The «include» arrows shall be dashed.
The «include» arrows shall have open arrow-heads.
To apply the use case technique in a project, the team shall agree on a specific methodology and/or philosophy. UML doesn't offer this, it is just a language (despite some definitions in the UML specification that point in a certain direction). Therefore, I will not give my opinion on whether this is a proper way of use case modeling.
With regard to generalization versus extension: both are possible in this case. If "Add Status" would mean: add pic or add video or etc., then a generalization would be more appropriate. The extension suggests that "Add Status" means: add pic and/or video and/or etc. In other words, each extending use case extends the original with additional capabilities.

Is use case narrative part of the UML?

Is use case narrative part of the UML?
A textual description of the business event and how the user will interact with the system to accomplish the task.
First of all, UML means Unified Modelling Language. It is a language which helps in designing and modelling software systems. So use case is not a part of UML. UML is a tool that helps to represent Use Cases (Among other things). And Use Case Modelling is an approach in requirement engineering for understanding and describing the functional requirements of a System.
It can be both narrative and graphical. Textual representation part is called use case specification while the graphical representation part is called Use case diagram.
So what is a use case? A use case is a summary of scenarios for a single task or a goal like "pay bill" in the above image. And a Use case model typically consists of several use cases. It helps to provide a clear picture about the external actors (both users and external systems),the functional requirements of the system and the relationships among them which in turn leads to a better design.
I'm going to assume that you mean "use case narrative." That given, the short answer to your question is "no."
A "use case narrative" is a document that describes the entire behavior of a use case. The UML doesn't define documentation methodologies specifically, so this isn't part of the UML specification.
The UML community has yet to build any sort of consensus on a term for this document (and, indeed, exactly what it ought to contain). Nipun Sampath, in his answer, calls it a "use case specification," for example, and muszeo calls it a "textual description," which, of course, it is.
The behavior of a use case would be modeled in UML as an activity diagram. So, an activity diagram is a diagram of a use case narrative.
For more information on use case narratives, see this post.
I believe you mean Use Case, rather than User Case. The description you give (textual description of steps to accomplish a business task using a system) is broadly what Use Cases are about.
To be clear, a Use Case is a kind of functional requirement; namely a description of a process that a person and/or system (role(s)) performs with information to accomplish an objective that has business value. With Use Cases this specification generally starts with a model ('blobs on a page') which illustrates the process, system and actor (role) context, with a textual description and/or supporting models (e.g. Activity Diagrams) to express the steps of the process. There are other ways to express functional requirements -- User Stories and BPMN process charts are two other examples that achieve the same thing but in different ways. You may be confusing Use Cases and User Stories, perhaps.

use case diagram how do it better

hello, my first question is how I can place cases to better readability? I want to make this diagram fit on a A4-sized paper.
But I am aware that this diagram may be badly made, so I ask you to advice, maybe I should share on the smaller part?
You need to to connect a use case only to its primary actor. So eventually you have to create a common role where the UC is used by this common actor role. Then your specific actors inherit from this common one. Like in #Amir's example International Student inherits from Student.
I'd simply up-vote the latter example but it has <<include>>/<<extend>> which is no favorable with use case synthesis. Moreover it uses a generalization which is very bad practice with UCs since a UC represent an individual added value and inheritance from added value does not make sense (unlike in a class context).
I don't understood your language (In your use-cases). Generally most of time we have some common feature so You can use inheritance in UML diagram. For example if you have different kinds of students (or Actors) that have some common feature you can do something like below picture:
I think there is too many of use cases. I had the same problem. Try using CRUD - https://books.google.co.uk/books?id=gKHfVZn1CkgC&pg=PA367&lpg=PA367&dq=crud+use+cases&source=bl&ots=g7C2qnzunP&sig=F3OtpNWT29NFyqFvmO-MBtTG98k&hl=en&sa=X&ved=0ahUKEwjAmKifh9_OAhWpCsAKHV9pA344ChDoAQg4MAU#v=onepage&q&f=false
Also, you can divide your diagram into few use case diagrams for each actor. Or put all actors on the one side of the diagram and use cases on other. Hope this helps.
I completely agree with the given suggestions (CRUD, inheritance and responsibility by roles) and I additionally recommend not to try to create an overview about the whole universe. Instead, try to separate your use cases into groups based on similarities, differences etc. and explain your modeling on smaller pieces.
Avoid too complex structures and mutual/cyclic dependencies - they are almost always a sign of poor design. Remember, you have to implement and test every connection in your diagram somehow. Less connections, less effort, less errors.

Is the Sequence Diagram per use case in UML or we draw it for the System in general?

I discuss with my friend our project and we are in a way to draw the sequence diagram ( UML 2).
He told me that the sequence diagram is drawn by the use case. It means that for each use case we should draw a Sequence Diagram.
Is it correct ?
Thank you for any suggestion.
Well, taken as dogma it is not correct. A sequence diagram (SD) shows the behavior of objects in the way they interchange messages (and also if needed their lifetime and some minor additional information). You "can" also use a sequence diagram to describe scenarios in use cases. But simply speaking, a SD is more technically oriented (class design/programmers) rather than business (business design/stakeholders). To visualize a use case scenario you're better off using activity diagrams (AD). And even better if you dive into BPMN (which brings ADs to a new level).
It is possible though, to convert ADs to SDs and vice versa without information loss (if you forget about the afore mentioned bits and pieces).
Now another point: you will not necessarily need a diagram for each use case. I found that often use cases are more easily (and even clearly) described in a textual way (see Cockburn or Bittner/Spence) rather than diagrammatically. Especially if you have UC scenarios that are very linear in their single actions. So you can leave out the AD for those and just fall back to simple text. You should further avoid describing UC scenarios in both ways (i.e. text and diagram) as this introduces unwanted redundancy (means you would need to maintain always both when changes happen; and they happen often; and people are lazy -> so which one holds the truth: text or diagram?).
Generally, as Thomas points out, use case detail is set forth in an activity diagram. As he also mentions, a use case scenario would use a sequence diagram, when necessary. A use case scenario is a single path through a use case.
Sequence diagrams aren't good at diagramming multiple simultaneous behaviors and multiple decision points, and use cases generally have both of these features in their behavior. Activity diagrams do these things very well. A single path through a use case, by definition, doesn't have simultaneous behaviors and decision points, so a sequence diagram is more appropriate.
Googling "use case scenario sequence diagram" gives a number of links that explain the use of sequence diagrams for use case scenarios in detail, of which this is an example.
UseCase is declaration of behavior (service or usefull behavior) of system which is executed by system with collaboration (interaction) with system's actors.
Any type of diagram defined in UML could by used to describe behavior on any level of abstraction. All of diagrams could be also used to describe both business or technical aspects of system.
UseCase is declaration of behavior, it means that UseCase does not define behavior at all. UML does not define scenarios of UseCase ,scenarios are usually defined in methodology not in UML.
If you need to describe behavior of system in context of UseCase you can use some of behavior diagrams defined in UML for each UseCase.

StarUML UseCase diagram for creating the Hangman game

As the title says I have problems creating a simple use case diagram for the game Hangman. The rules are simple, the computer generates a word, it gives you the length and the first and last letter, and you have 9 tries to guess the word. So far I've done this :Hangman Diagram
The problem is that this is my first diagram, and I think I didn't I put everything in order and the player is associated with more actions. Every suggestion will be greatly appreciated. Thank you in advance.
You have it very detailed.
Also there seam to be misunderstanding of Actors definition. Quote:
Actors. An actor is a person, organization, or external system that
plays a role in one or more interactions with your system.
Your Computer actor is in fact internal system therefore should not be modeled as an actor.
Also for the use cases
A use case describes a sequence of actions that provide something of
measurable value to an actor.
The point here is about providing measurable value.
I suggest you to try to change it when you think more about these UML principles.
EDIT:
Nice UML example for game is here: http://xnagamedevelopment.blogspot.cz/2009/03/use-case-diagram.html
Interesting discussion on game industry vs uml is here: http://www.gamedev.net/topic/192120-uml-for-games/
That discussion might not help with your assignment, though.

Resources