user3161357
user3161357

Reputation: 13

Class diagram from use case, should I include the system?

I am trying to build a class diagram from use case. But I am not sure if I should include the system in class diagram. I have system as actor in use case diagram. If I include it in the case diagram can I use it without attributes....

Upvotes: 1

Views: 900

Answers (4)

addisu
addisu

Reputation: 634

In my experience, I usually create Object interaction Diagram from Use Cases. Mostly, the nouns on the Use Cases are Classes ... In Object Interaction Diagrams, I can have clear ideas about the methods and lifespan of the Classes ...

"Object Interaction Diagrams" or "Interaction Diagrams" are usually to elaborate a single use Case ..

A simple google search gave me this link and it gives you some idea ...

http://www.cs.unc.edu/~stotts/145/CRC/Interactions.html

Upvotes: 0

Gangnus
Gangnus

Reputation: 24464

"I have system as actor in use case diagram" - Actor can be human or non-human system external to your subject that is your whole system. For example, card payment system or buyer are actors for net stores. You can show your system in the use case diagram, too, but it will be a rectangle, containing ALL use cases - not really so much useful thing. But showing of SUBsystems can be useful.

Later you can draw a deployment diagram - if different subsystem lie on different computers. And maybe, some dynamic diagrams of how they talk to each other and actors.

If we are talking on static diagrams, your next step will be component diagram - you'll divide your system in smaller parts and show who talks to who and here already the classes of messages being sent can appear.

Later - you'll plan what packages will contain your classes and what will be visible from which. Package diagram.

Later - yes, at last we are here - you create the class diagram(s). Maybe, several - for different components. So, you are a bit too in a hurry.

Sometimes, especially, if you work with some special objects of some class(es), you need Object Diagram.

And don't forget - there are also dynamic diagrams, I have mentioned static ones only.

Upvotes: 1

observer
observer

Reputation: 3005

"I am trying to build a class diagram from use case"

Use-cases are a very abstract and user-centric view of the system while class diagrams are fine-grained and technically focused.

So you should not try to infer your classes directly from a UC diagram. Instead, use the repertoire UML gives you (component-, activity-, sequence diagrams etc.)

Upvotes: 0

Kiran
Kiran

Reputation: 129

Can you please elaborate your question with specific example in order to get better knowledge about the scenario?

As far my knowledge, one can use the system such as any controller class which is again an actor here as class in the class diagram.

Upvotes: 0

Related Questions