问题
I have the following use case diagram

What is the best way to create a class from this diagram?
I've tried creating two main classes (UserManager
and ContentManager
) but the whole class structure looks wrong and illogical.
Can anyone provide a simple example to help me?
[Edit] Below I've pasted my class diagram. What would you change or what do you think about it?

回答1:
A Class
represents a set of things from the problem domain, not an arbitrary bucket of code. For example, you should have classes like Comment
, Article
, Announcement
, and Advertisement
. You should have associations between pairs of related classes, each association having named properties and multiplicities. The result should look like this. You will eventually give each of those classes responsibilities. That is how object oriented analysis and design works.
Class names ending in the word Manager
indicate you're doing it wrong.
来源:https://stackoverflow.com/questions/35797303/class-diagram-from-use-case-diagram