面向对象软件工程_对象图| 软件工程

对象图是UML中的一种图表,显示了类的实例在特定时间点的状态,包括对象及其关系。它用于表示类的实例化和理解对象的工作原理。对象图由对象、属性、链接组成,可以通过几个步骤从类图中衍生出来。实例规格描述了对象的当前状态,包括分类器、实例名称和属性值。
摘要由CSDN通过智能技术生成

面向对象软件工程

什么是对象图? (What is an Object Diagram?)

An object is a real-world problem entity whose activities are defined by the classes. The Object is a specimen of a particular moment in runtime, plus objects and data ethics or values. A steady UML object diagram is an example of a class diagram; it shows a snap of the detailed state of a system at a point in time, thus an object diagram circumscribe objects and their relationships at a point in time. It may examine a special case of a class diagram or a communication diagram.

对象是现实世界中的问题实体,其活动由类定义。 对象是运行时特定时刻的样本,还包括对象和数据伦理或价值观。 稳定的UML对象图是类图的示例。 它显示了某个时间点的系统详细状态的快照,因此,一个对象图限制了某个时间点的对象及其关系。 它可以检查类图或通信图的特殊情况。

对象图的符号 (Notation of the Object Diagram)

Object Diagram | 1

对象图的动机 (The Motive of Object Diagram)

  1. It is used to represent the occurrence of the class. You might create a class diagram to present the structure and then create a set of objectives.

    它用于表示类的出现。 您可以创建一个类图来表示结构,然后创建一组目标。

  2. It is used to understand the activity or working of an object.

    它用于了解对象的活动或工作。

In summary, the relation between the instantiated class and the defined class is been shown by the Object diagram. The best way to exemplify what an object diagram looks like is to show the object diagram generated from a similar class diagram.

总之,对象图显示了实例化类和已定义类之间的关系。 举例说明对象图看起来的最好方法是显示从类似的类图生成的对象图。

对象图符号 (Object Diagram Notation)

  1. Name: Every object is represented like a rectangle, that offers the name from the object and its class emphasize as well as divided with a colon.

    名称 :每个对象都像一个矩形表示,该矩形提供了对象的名称及其类的重点,并用冒号分隔。

  2. Attributes: Similar to classes, you can list object characteristics inside a separate section. However, unlike classes, object credit should have values given to them.

    属性 :与类相似,您可以在单独的部分中列出对象特征。 但是,与类不同,对象信用应该具有赋予它们的值。

  3. Links: Links tells to be an example associated with the relationship. You can draw a link while using the lines utilized in class diagrams.

    链接 :链接是与关系相关的一个例子。 您可以在使用类图中使用的线条的同时绘制链接。

绘制对象图的步骤 (Steps for drawing Object diagram)

A communication diagram called collaboration in the previous version of UML without comment is known as an object diagram. An object diagram must be a valid actualization of a fixed class diagram. This can be used as a fast regularity check. To do this we can develop an object diagram by using the following steps:

在UML的先前版本中没有注释的称为协作的通信图称为对象图。 对象图必须是固定类图的有效实现。 这可以用作快速规律性检查。 为此,我们可以使用以下步骤来开发对象图:

  • Recognize the mechanism you'd like to draw. An apparatus constitute some functions or behaviors of the part of the system you are modeling.

    识别您想要绘制的机制。 设备构成您要建模的系统部分的某些功能或行为。

  • Show the state and accredit values of each such object, as necessary, to understand the scene.

    根据需要显示每个此类对象的状态和认证值,以了解场景。

实例规格 (Instance specification)

Each object and link on an object diagram is presented by a current quality. This can show an object's classifier e.g. an abstract or concrete class and instance name, as well as attributes and other structural features using slots. Each part corresponds to a single meaning or feature and may include a value for that state.

对象图上的每个对象和链接均以当前质量表示。 这可以显示对象的分类器,例如抽象或具体的类和实例名称,以及使用槽的属性和其他结构特征。 每个部分对应一个单一的含义或特征,并且可以包括该状态的值。

The name on an instance specification optionally shows an instance name, separator, and not compulsory one or more classifier names separated by commas.

实例规范上的名称可以选择显示实例名称,分隔符,而不是一个或多个用逗号分隔的分类器名称。

对象图示例 (Object diagram example)

Object Diagram | 2


Image source: https://cloud.smartdraw.com/editor.aspx?templateId=680993af-b8b1-48a9-8fce-3f57a65eb834&noro=1&nsu=1

图片来源:https://cloud.smartdraw.com/editor.aspx?templateId=680993af-b8b1-48a9-8fce-3f57a65eb834&noro=1&nsu=1

翻译自: https://www.includehelp.com/basics/object-diagram-software-engineering.aspx

面向对象软件工程

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值