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基本架构建模--类的术语和概念的更多相关文章

  1. UML基本架构建模--类的辅助信息

    Organizing Attributes and Operations 组织属性和操作 When drawing a class, you don't have to show every attr ...

  2. UML基本架构建模--获取类

     Getting Started 開始 Modeling a system involves identifying the things that are important to your p ...

  3. UML基本架构建模--类概述

     Classes 类 Classes are the most important building block of any object-oriented system. A class is ...

  4. 使用 UML 进行业务建模:理解业务用例与系统用例的相似和不同之处

    使用 UML 进行业务建模:理解业务用例与系统用例的相似和不同之处   作者:Arthur V. English 出处:IBM   本文内容包括: 背景 业务用例模型与系统用例模型有什么相似之处? 业 ...

  5. 基于UML的时空建模

    一.基本信息 标题:基于UML的时空建模 时间:2018 出版源:东北大学学报(自然科学版) 领域分类:UML模型:RCC-8空间拓扑:Allen-13时态拓扑:时空数据:建模 二.研究背景 问题定义 ...

  6. 基于 UML 的业务建模举例

    简介: 对于管理流程咨询项目.大型信息化建设项目和套装管理软件实施项目,对业务环境的分析和理解对项目的成功至关重要.系统.全面理解 IT 系统所处的业务环境,可以帮助 IT 系统能提供正确系统功能,并 ...

  7. 【UML分析、建模与设计】我在工作时遇到UML

    一.前言 UML分析.建模与设计 来自现实世界中的概念的抽象描述方法(摘取自<UML面向对象分析.建模与设计(第2版)>) 就我对UML分析与建模技术的认知,最早可追溯至2019年时的学习 ...

  8. 《UML精粹》第三章 -类图的基本概念

    第三章 类图:基本概念 类图可用来描写叙述系统中各种对象的类型.也可描绘出对象间各种各样的静态关系.此外.类图中也能够秀出类的性质(property)与操作(operation),以及可应用到对象间连 ...

  9. UML学习笔记:类图

    UML学习笔记:类图 有些问题,不去解决,就永远都是问题! 类图 类图(Class Diagrame)是描述类.接口以及它们之间关系的图,用来显示系统中各个类的静态结构. 类图包含2种元素:类.接口, ...

随机推荐

  1. wireshark抓取mysql数据包

    最近在学习搭建数据库服务,因为跟产品相关所以需要从流量中拿到mysql的数据包.然后就想着在本机搭建mysql数据库,然后连接,用wireshark抓就行了. MySQL搭建用的是XAMPP,想说XA ...

  2. Attribute 'items' must be an array, a Collection or a Map错误解决!

    唉!真的要说一句话叫做论一串代码的重要性!就是如此的气人!气的牙根痒痒! 前几天刚刚写过SpringMVC之ModelAndView的 jsp值在浏览页面不显示的问题!也是因为这一串代码,但是这一次一 ...

  3. Docker 生态

    Docker 和容器技术的发展可谓是日新月异,本文试图以全局的视角来梳理一下 docker 目前的生态圈.既然是概览,所以不会涉及具体的技术细节. Docker 自从发布以来发生了很多的变化,并且有些 ...

  4. 玲珑oj 1117 线段树+离线+离散化,laz大法

    1117 - RE:从零开始的异世界生活 Time Limit:1s Memory Limit:256MByte Submissions:438Solved:68 DESCRIPTION 486到了异 ...

  5. 玲珑oj 1128 RMQ模板

    1128 - 咸鱼拷问 Time Limit:3s Memory Limit:128MByte Submissions:380Solved:118 DESCRIPTION 给你两个序列A,B.每个序列 ...

  6. leetcode 559. Maximum Depth of N-ary Tree

    Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longe ...

  7. TCP/IP网路协议复习

    1.OSI (Open System Interconnect Protocol) 开放互联协议,这是一个七层的计算机网络协议,包括:物理层.数据链路层.网络层.传输层.回话层.表示层.应用层.    ...

  8. 性能优化 - 查看 webpack 打包后所有的依赖关系(webpack 可视化工具)

    查看 webpack 打包后所有组件与组件间的依赖关系,针对多余的包文件过大, 剔除首次影响加载的效率问题进行剔除修改,本次采用的是 ==webpack-bundle-analyzer(可视化视图查看 ...

  9. PCA--主成份分析

    主成份分析(Principle Component Analysis)主要用来对数据进行降维.对于高维数据,处理起来比较麻烦,而且高维数据可能含有相关的维度,数据存在冗余,PCA通过把高维数据向低维映 ...

  10. python项目中requirements的巧用(一键导入所有安装包)

    一个Python 项目中可能安装很多安装包, 再次创建虚拟环境是需要重新安装的话很麻烦也费时间, 或者项目部署的时候避免重装, 可以将现有项目的所有安装包记录在requirements.txt 文件, ...