Use case diagram for book exchanging system - uml

Is the diagram correct? Can more use cases be added in this diagram? Is there a need for include and extend functionalities?

The diagrams look ok and you can add more use cases at your wish. But for clarity sake it's advisable to split them into sub-domains where you can focus on a couple of somehow related use cases. Do this by creating different diagrams or using boundaries to split the sub-domains.
Avoid <<include>> and <<extend>>. Use cases undergo a synthesis an not an analysis. There are only very rare cases where one could use those relations in a useful way.

Can more use cases be added in this diagram?
This should not be your goal, therefore I daresay you don't want to ask this question. At least not anyone!
Instead, try to model the fewest possible UML entities without losing valuable information. Simplifying and splitting up diagrams into simpler parts is often way more challenging than modeling new entities.
The question is: Which information is required? You'll need to work that out with your stakeholders. Remember: YAGNI.

Related

Is nested alt in sequence diagram a good practice?

I have created a sequence diagram, and found it has multiple nested alt.
Is this a good or bad practice?
If it is a bad practice, what should I do instead?
The good, the bad and the ugly
It is difficult to give advice about good and bad practices without objective criteria, and these will depend on the purpose of the diagram:
If you use UML for some kind of visual programming, where a comprehensive diagram should show all the details of a specific interaction, nested alt could be a good practice if there is no alternative. Since different lifelines are driving independent alternatives (FusionAuth the outer alt, Occupations the inner one), the nesting represents the behavioral logic appropriately. But if a same lifeline would drive decision, a flattened alt could a be a more readable way, trading the more complex nesting against more but simpler branches.
If you use UML to communicate and to reason about a system, the diagrams should be easily understood: nesting would be a bad practice, since it adds a level of complexity.
We fortunately have avoided the ugly: identical nested alt in several branches.
Alternatives to nested alt
The UML secret is to have more diagrams but smaller ones, each focusing on a single aspect. You can find this advice at the end of almost every chapter of Booch, Jacobson and Rumbaugh's book The UML User guide.
Two strategies are applicable here:
Diagrams per scenario: the main success scenario would be one diagram, and the different failure scenarios would be the others. Super-easy to read.
Separation of concerns: Different concerns would be addressed in different diagrams you could for example separate the use of Occupations by its clients and the way Occupations does its business: separate Manager, Client, Occupations, and Occupations, FusionAuth and Database in two diagrams; You'd avoid nested alt, the inner one being in the second diagram and not necessarily relevant for the same audience.
Remark: I'm not a big fan of visual programming. But if you are, the second strategy is fully compatible with it, with the advantage of preventing the ugly repeating of the same nested fragments in several places.
Sort of. You can do that and it will be okay. However, once you start doing that you are in danger to fall in graphical programming. Once upon a time people dreamed of graphical programming as the solution for the future. Simply, it isn't. Code is much denser and easier to read. So don't start writing programs that way.
Now for the use of that construct. Where ever you want to show some complex collaboration a graphical overview of the participants will be most helpful. But only if you stick to the most important part of tha communication. Rather than nesting fragments it's better to have different SDs to focus. You can use message endpoints to cross between detail diagrams. Again, it depends on how you make the split. It needs some experience to find the golden ratio.

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.

what is the first UML diagram to draw when creating a large scale software?

Im in a confusion on the sequence of drawing UML diagrams. I cannot understand where to start drawing them. Which diagram should come first if I have the scenario with me?
Start with Use Cases (and the related diagrams). Once Actors and Use Cases are identified, you can start designing a Class model. Create Collaborations realizing the Use Cases. Then inside show how the Instances of the Classes collaborate to actually realize what is needed for the Use Cases.
I recommend the ICONIX approach since that is what got me going a long time ago.
The other option is to start with Activity Diagram. I.e. make a business process analysis.
I always start with a problem-domain class diagram. (Some examples of what I mean are here and here.) Understanding the concepts in the domain and the relationships between them is extremely important. If you don't understand the problem domain, everything else will be confused and brittle, including business processes, requirements, use cases, and collaborations. Here is an example of an improper domain model, and here are the recommended corrections.

UML use case diagram problem with relations between actors and use cases

i've been created the following diagram for forums system but i'm not sure if the relation between use cases and actors is correct.
so i want to know if my diagram is correct or if i've added too much complexity to my diagram. did i got my use cases relation with the actors correctly? well to better say, is it correct at all?
any help is really appreciated.
Not a bad effort for a first attempt, but I'd say it is a bit over complex. When you do analysis, using use cases or some other method, you really do want to keep it simple and avoid going into design mode, which is when you start thinking about relationships between things.
In my opinion, your actors should not be generalizations of one another. A "person who posts" on a forum is not a a more specific type of a "person who reads posts": they are different roles which the same person might take on at different times, not expansions on one another. So I'd advise you to drop those generalizations.
The same goes for the use cases themselves. Normally, use cases relate to one another by way of either the <<extend>> or <<include>> relationship, but generalizations or not normally used. Use cases aren't like classes and don't really have the option of being abstract, so the "manage" use cases need to make sense on their own, and they don't really do that. Your "concrete" use cases, on the other hand, make perfect sense.
In order to group related use cases together, it's a better idea to use separate diagrams and / or gather the use cases into packages called "post management", "site administration", etc. There is nothing which says you have to put all your use cases into a single diagram.
I support your method of use case diagrams. I struggled with this very issue a while back. To show each association from one use case to each of the actors was getting messy. By generalizing the actors, it consolidated the associations into a nice, easily readable format. Thus, the information is easier for others to consume.

USE CASE UML Modeling different ways to System access (SMS, IVR, WEB)

I’m working on a USE CASE diagram but I’m having problems modeling the following:
A user wants to inquire his balance, but he can do it by phone, SMS or IVR. How should I represent the different ways? Each one has different flows. Should I model just one use case for each one, or should I represent the different ways as extended use case.
If the three cases share flow to a huge extent (say >70%) I would model them as one use case. Otherwise it would be better to model three different use cases.
The point here is understandability. Cramming three different things into one is confusing, repeating the same three times is confusing as well (although probably less).
There is no right or wrong answer to your question. UML allows the same situation to be modeled differently. It depends mainly on the level of abstraction you choose for your use case diagrams.
You'd have a common use case with 3 extensions. You'd then detail each extension with sequences diagrams.

Resources