如何在UML中表示类实例? [英] How to represent class instances in UML?

查看:211
本文介绍了如何在UML中表示类实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个适用于我的应用程序的类图,该类图由几种组合和聚合组成.

I have a class diagram for my application which consists of several compositions and aggregations.

现在,我想基于显示类实例的类图创建图.快照(如果需要).我需要这样做,因为这将有助于讨论一些功能要求.

Now I want to have diagram based on the class diagram which shows class instances. A snapshot if you will. I need this because it would help discussing some functional requirements.

类图:

 --------   1                 *  ------- 
| Parent |----------------------| Child |
 --------                        -------

实例"图:

 --------                        --------- 
| Parent |----------------------| Child 1 |
 --------           |            ---------
                    |
                    |            ---------
                    +-----------| Child 2 |
                    |            ---------
                    |
                    |            ---------
                    +-----------| Child 3 |
                                 ---------

是否有一个图表类型? (当前,我误用了一个类图,其中所有实例都是单独的类)

Is there a diagram type for this? (Currently I'm mis-using a class diagram, where all my instances are separate classes)

推荐答案

  • 使用对象图
  • 使用关键字<< 实例>>或
  • 下划线的班级名称
    • Use Object diagram or
    • Use keyword <<instance>> or
    • Underline class name
    • 这篇关于如何在UML中表示类实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆