类图-如何描述图形数据类型? [英] Class Diagram - How to describe a graph datatype?

查看:244
本文介绍了类图-如何描述图形数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在类图中表示图形数据类型

How do I represent a graph data-type in a class diagram

类图: http://www.uml-diagrams.org/class-diagrams.html

我必须指定如何实现图形数据类型?还是有用于表示图形的符号?

Do I have to specify how graph data-type is implemented? Or is there a symbol to denote a graph?

推荐答案

UML本身包含的图是图形状态机图活动图),但不会提供您的真实身份

UML itself includes diagrams that are graphs (state machine diagrams, activity diagrams) but will not provide what you are expecting.

UML最初是为面向对象的程序设计的,而不是一般的程序设计。它将允许您表示面向对象的功能,而不是常规的编程功能(因为图形不是面向对象的功能)。

UML is originally conceived for object-oriented programming, not programming in general. It will allow you to represent object-oriented features, not general programming features (as graphs are not object-oriented features).

因此,您将能够表示图形类作为类,而不是图形数据类型。图形是抽象的数据类型,由程序员决定(它与您的编程方式高度相关,无需OOP就可以管理图形)。

So you will be able to represent a Graph class as a class, not as a graph data type. Graph are abstract data types, it is up to the programmer to implement (it will be highly related to the way you are programming, you can manage graphs without OOP).

这篇关于类图-如何描述图形数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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