简体   繁体   English

用例图UML,手机和客户是两个不同的角色还是相同的角色? (日食)

[英]Use Case Diagram UML, will a mobile phone and customer be 2 different actors or the same? (ECLIPSE)

例如,我们如何知道客户和移动电话用户不是2个不同的人,例如,一位父母订购了合同电话,但她/他的孩子使用了合同电话,因此您将有2个演员,一个叫移动电话用户,另一个叫客户,否则只会是一个?

You'll notice from the comments that the answer to your question depends on information that you haven't provided. 您会从评论中注意到,问题的答案取决于您尚未提供的信息。 It doesn't really matter whether the mobile phone user and the customer are two different people or not. 手机用户和客户是否是两个不同的人并不重要。 What does matter is the context in which they are interacting with the system. 重要的是他们与系统交互的上下文。

For example, suppose you have two different people with bank accounts. 例如,假设您有两个不同的人拥有银行帐户。 One has a checking account, and one has a savings account. 一个人有一个支票帐户,一个人有一个储蓄帐户。 You could set them up as two different actors, but it's probably better to just have one customer actor. 您可以将他们设置为两个不同的参与者,但是最好只有一个客户参与者。 After all, you would probably have any number of customers, and each would have either type of account or both. 毕竟,您可能有任意数量的客户,并且每个客户都有一种帐户类型或两者都有。 So, the fact that one customer might not have a savings account isn't relevant to the system. 因此,一个客户可能没有储蓄帐户这一事实与系统无关。 The system has savings use cases and checking use cases and customers as a group interact with both. 该系统具有节省用例的功能,并且可以将用例和客户作为一个组进行检查,从而与两者进行交互。

So, how does that apply to your situation? 那么,这如何适用于您的情况? It depends. 这取决于。 It seems most likely, however, that most of the people paying for the phone service are also the people using the phone. 但是,似乎最有可能为电话服务付费的人也是使用电话的人。 In that case, there would just be one type of actor. 在那种情况下,只有一种类型的演员。 If on the other hand, the system had distinctly different use cases for people who paid for the service and people who used it, and those people were often different, you could draw that distinction by using two different actors. 另一方面,如果系统为使用服务付费的人和使用服务的人有明显不同的用例,而这些人通常是不同的,则可以通过使用两个不同的参与者来区分这种区分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM