问题
Here's the use case scenario I have
Ever Green Homes PVT Ltd. (EGH) sells houses. People who want to sell their houses sign a contract with EGH and provide information on their house. This information is kept in a database by EGH and a subset of this information is sent to the citywide multiple listing service used by all real estate agents. EGH works with two types of potential buyers. Some buyers have an interest in one specific house. In this case, EGH prints information from its database, which the real estate agent uses to help show the house to the buyer (a process beyond the scope of the system to be modeled). Other buyers seek EGH’s advice in finding a house that meets their needs. In this case, the buyer completes a buyer information form that is entered into a buyer data base, and EGH real estate agents use its information to search EGH’s data base and the multiple listing service for houses that meet their needs. The results of these searches are printed and used to help the real estate agent show houses to the buyer.
There are to types of buyers in the description.
I want to know if both types of buyers are mapped in the use case diagram. If yes, how to map them?
Here's the use case diagram I drew:
Please help me correct any issues with my diagram if there's any...
回答1:
The two kind of buyers
Indeed, you did very well: the two kind of buyers used in the narrative only introduce different ways of using the system under consideration.
They do not correspond to different roles: a buyer interested in one house may later provide his/her information to see other houses as well. Conversely, a buyer having received a list may later be interested in specific houses.
In the real estate business, the difference between the two kind of buyers is that the specific interest generally results in a more detailed description of the estate being provide, which may result in a visit, and ultimately in a transaction.
What are the real actors ?
Now strictly speaking, reading the narrative, I am not sure that the sellers and buyers use the system at all. They seem to interact with a real estate agent, with whom sellers will sign a contract, or the (potential) buyer may resquest information.
Of course, we could imagine an internet based interaction with a web service. But the narrative says "EGH prints information from its database, which the real estate agent uses to help show the house to the buyer". Similarly, the wording "the buyer completes a buyer information form that is entered into a buyer data base" suggest that "entered" seems to suggest "keyed in by the clerk".
So you really need to clarify what is the subject, i.e. the system under consideration for the use-cases. The list of actors will depend upon it.
System under consideration
If the subject it is the internal software application of the real estator, I see only three actors (since sellers and buyers do not interact with the the system):
- Real estate agent (primary, human)
- Clerk (primary, human)
- Citywide multiple listing service (secondary, system)`
If it is an internet service provided by the real estator, that the seller and buyer could interact with, your actors would be right (missing the listing service, though).
If it is the real estate agency itself (i.e. a business use-case, like Ivar Jacobson proposed in his book "The Object Advantage: Business Process Reengineering With Object Technology" and in RUP), then there is a shift in focus and we would have only actors outside the real-estate agency (so no clerk, no agent): Seller, Buyer, Company operating the listing service.
回答2:
In general I think your diagram is clear and understandable. You could easily just leave it as is IMHO as it conveys the message. A single buyer could in theory interact with either or both Use Cases (I assume) so it is likely correct as it is.
However if you want to distinguish between two kinds of buyers then you can use a generalization as your post title suggests. It depends on what you're trying to convey, why and to whom really.
来源:https://stackoverflow.com/questions/61016770/how-to-generalize-actors-in-uml-diagrams