I'm trying to draw the correspond UML class diagram of the use case diagram of a simple blogging system, which is displayed as follows:
To draw the class diagram, there should be two classes: User and Blog. But I have difficult drawing the association between them because there could be two different multiplicities in the relations between those two classes. For example, when user create a blog, the class diagram would look like this:
But in terms of user viewing blog, the multiplicity is different as a certain blog can be viewed by not only 1 user, so the class diagram would look like this:
So how can I solve this issue in solution domain?
In addition to Thomas' answer:
User
and Blog
. But this is more implicit knowledge than use-case analysis: your system MUST keep track of the link of a Blog
and the User
who created it, so to enable him also later updates and deletes. Blogs
that a User
did consult (to measure audience, to keep track of history, etc...). So your system COULD also keep track of the viewing (but it could also work without). You could show the navigation arrow. But in your system, the navigation will certainly be bidirectional.
A more systematic approach to the use case analysis is to use the entity- control-boundary approach, and use the following classes for the design:
Blog
and User
as aboveCreateOwnBlog
and ViewBlog
ViewingSubsystem
and AuthoringSubsystem