UML基本架构建模--类的术语和概念
Terms and Concepts
术语和概念
A classis a description of a
set of objects that share the same attributes, operations, relationships, and semantics. Graphically, a class is rendered as a rectangle.
一个类描写叙述一组对象。这组对象共享同样的属性,操作,关系和语义.图形上,一个类被表达为一个矩形.
Names
名称
Every class must have a name that distinguishes it from other classes. Aname
is a textual string. That name alone is known as a simple name;
aqualifiednameis
the class name prefixed by the name of the package in which that class lives. A class may be drawn showing only its name, as Figure 4-2 shows.
每一个类必须有一个名称以差别于其他的灯.一个名称是一个文本字符串.这个名称被称为一个简单的名称。一个合格的名称是带有这个名称所在包的前缀的名称.一个类可能仅仅画出它的名称,就像图4-2显示的.
Note:A class name may be text consisting of any number of letters, numbers, and certain punctuation
marks (except for marks such as the double colon, which is used to separate a class name and the name of its enclosing package) and may continue over several lines. In practice, class names are short nouns or noun phrases drawn from the vocabulary of the system
you are modeling. Typically, you capitalize the first letter of every word in a class name, as inCustomer
orTemperatureSentor.
备注:一个类名能够是由随意个字母,数字和某些标点符号组成(除了双冒号。它通经常使用来分隔类名和封装此类名的包)的文本,类名也可能超过多行.在实际中,类名通常来自你正在建模的系统的词汇表中的短名词或名词短语.通常类名的每一个单词的首字母需大写。如Customer或TemperatureSentor.
Attributes
属性
Anattribute
is a named property of a class that describes a range of values that instances of the property may hold. A class may have any number of attributes or no attributes at all. An attribute represents some property of the thing you are modeling that is shared by
all objects of that class. For example, every wall has a height, width, and thickness; you might model your customers in such a way that each has a name, address, phone number, and date of birth. An attribute is therefore an abstraction of the kind of data
or state an object of the class might encompass. At a given moment, an object of a class will have specific values for every one of its class’s
attributes. Graphically, attributes are listed in a compartment just below the class name. Attributes may be drawn showing only their name, as shown in Figure 4-3.
一个属性确定一个类的特性。用来描写叙述特性实例值的范围.一个类可能有多个属性也可能根本没有属性.一个属性表示的是你正在构建的类的全部对象共享的那些特性.比如,每面墙有高度。宽度和厚度;你或许在以这样一种方式构建你的客户模型:每一个客户有一个名字,地址,电话号码和出生日期.一个属性是数据类型的抽象或是这个类的对象所包括的状态.在给定的时刻。一个类的一个对象将为它的每一个类属性设定特定的值.图形表现上,属性被列在类名称下的分隔栏内.属性能够仅仅显示它们的名称,如图4-3显示的那样.
Note:An attribute name may be text, just like a class name. In practice, an attribute name is
a short noun or noun phrase that represents some property of its enclosing class. Typically, you capitalize the first letter of every word in an attributes name except the first letter, as inname
orloadBearing.
备注:一个属性的名称就象类名一样能够是文本.在实际中。一个属性的名称是短名词或名词短语,代表封装它的类的一些性质.通常属性名称除了第一个单词外的其他单词的首字母需大写。如name或loadBearing.
You can further specify an attribute by stating its class and possibly a default initial value, as shown Figure 4-4.
你能够通过类的状态和默认初始值来进一步说明属性。就如图4-4显示的.
Operations
操作
Anoperationis
the implementation of a service that can be requested from any object of the class to affect behavior. In other words, an operation is an abstraction of something you can do to an object that is shared by all objects of that class. A class may have any number
of operations or no operations at all. For example, in a windowing library such as the one found in Java’sawt
package, all objects of the classRectangle can
be moved, resized, or queried for their properties. Often (but not always), invoking an operation on an object changes the object’s
data or state. Graphically, operations are listed in a compartment just below the class attributes. Operations may be drawn showing only their names, as in Figure 4-5.
一个操作是一种服务,能够实现来自这个类的不论什么对象请求,以影响其行为.还有一方面。一个操作是你对一个对象的动作被该类的全部对象所共享的抽象行为.一个类能够拥有不论什么数量的操作,也能够根本没有操作.举个样例,在窗体库中,如在Java
AWT包中找到的,类Rectangle的全部对象都能够被移动。可调整大小。或者查找它们的属性.通常(但不总是)在一个对象上调用一个操作改变这个对象的数据或是状态.图形表示上。操作被列在类属性下的分隔栏内.操作能够仅仅显示它们的名称。如图4-5显示的.
Note:An operation name may be text, just like a class name. In practice, An operation name is
a short verb or verb phrase that represents some behavior of its enclosing class. Typically, you capitalize the first letter of every word in an operation name except the first letter, as inmove
orisEmpty.
备注:一个操作的名称就象类名一样能够是文本.在实际中,一个操作的名称是简单动词或动词短语,代表封装它的类的一些行为.通常操作名称除了第一个单词外的其他单词的首字母需大写。如move或isEmpty.
You can specify an operation by stating its signature, which includes the name, type, and default value of all parameters and (in the case of functions) a return type, as shown
in Figure 4-6.
你能够通过描写叙述它标签说明一个操作,标签包括名称。类型,全部參数的默认值和(在函数的情况下)返回类型,象图4-6显示的.
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGlzdGVuX3Nub3c=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" />
UML基本架构建模--类的术语和概念的更多相关文章
- UML基本架构建模--类的辅助信息
Organizing Attributes and Operations 组织属性和操作 When drawing a class, you don't have to show every attr ...
- UML基本架构建模--获取类
Getting Started 開始 Modeling a system involves identifying the things that are important to your p ...
- UML基本架构建模--类概述
Classes 类 Classes are the most important building block of any object-oriented system. A class is ...
- 使用 UML 进行业务建模:理解业务用例与系统用例的相似和不同之处
使用 UML 进行业务建模:理解业务用例与系统用例的相似和不同之处 作者:Arthur V. English 出处:IBM 本文内容包括: 背景 业务用例模型与系统用例模型有什么相似之处? 业 ...
- 基于UML的时空建模
一.基本信息 标题:基于UML的时空建模 时间:2018 出版源:东北大学学报(自然科学版) 领域分类:UML模型:RCC-8空间拓扑:Allen-13时态拓扑:时空数据:建模 二.研究背景 问题定义 ...
- 基于 UML 的业务建模举例
简介: 对于管理流程咨询项目.大型信息化建设项目和套装管理软件实施项目,对业务环境的分析和理解对项目的成功至关重要.系统.全面理解 IT 系统所处的业务环境,可以帮助 IT 系统能提供正确系统功能,并 ...
- 【UML分析、建模与设计】我在工作时遇到UML
一.前言 UML分析.建模与设计 来自现实世界中的概念的抽象描述方法(摘取自<UML面向对象分析.建模与设计(第2版)>) 就我对UML分析与建模技术的认知,最早可追溯至2019年时的学习 ...
- 《UML精粹》第三章 -类图的基本概念
第三章 类图:基本概念 类图可用来描写叙述系统中各种对象的类型.也可描绘出对象间各种各样的静态关系.此外.类图中也能够秀出类的性质(property)与操作(operation),以及可应用到对象间连 ...
- UML学习笔记:类图
UML学习笔记:类图 有些问题,不去解决,就永远都是问题! 类图 类图(Class Diagrame)是描述类.接口以及它们之间关系的图,用来显示系统中各个类的静态结构. 类图包含2种元素:类.接口, ...
随机推荐
- git 提交作业流程
git 提交作业流程,主要分为4个步骤 # 拉取远程git最新版本到本地,每次都可以先执行这条命令,因为会有其他同学更新仓库 git pull # add需要上传的文件,那个文件修改或者新增的,就ad ...
- CSS布局框架 960GS 表单排版示例
- hduacm集训单人排位赛1002
自适应simpson积分公式 通过二分区间递归求simpson积分 #include<map> #include<set> #include<cmath> #inc ...
- 1-22-shell脚本的基础
1.1 shell 脚本的编写规范 1.2 变量与特殊变量应用 1.3局部变量与全局变量 1.4 条件测试表达式 ------------------------------------------- ...
- 51nod-1103-抽屉原理
1103 N的倍数 题目来源: Ural 1302 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 一个长度为N的数组A,从A中选出若干个数,使得 ...
- SSH集成log4j日志环境
第一步:在web.xml初始化log4j <context-param> <param-name>contextConfigLocation</param-name> ...
- BGP&RIP
策略路由是2000之前 如果不通检查是否有相互影响的策略 BGP 25端 查看 25是上端起lan 地址是172.100.1.254 互联158是下端起wan 172.100.1.158 25的内 ...
- configParse模块
一.配置文件简介 在各种程序里面都有配置文件,为了对配置文件进行操作. python中引入了configParse模块进行操作. 配置数值类型: 配置文件中,我们看到的bool型,整数型,在我们操作的 ...
- MySQL,SqlServer数据库关键字在程序中处理
这个原来是SqlServer的数据库,现在改成MySQL的,由于两个数据库有些差别.在程序中怎么处理.为了给自己提个醒,把它记录下来. 这是MySQL数据库 Public Sub display() ...
- Tencent tinker 出现pre-verified crash
异常类型:app运行时异常 手机型号:sumsung N9008 手机系统版本:android4.4.2 tinker版本: 1.8.1 gradle版本::2.3.3 是否使用热更新SDK: Tin ...