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. 清理网页中的HTML

    public string ClearHtml(string text)//过滤html,js,css代码 { text = text.Trim(); if (string.IsNullOrEmpty ...

  2. Wannafly挑战赛14E无效位置

    https://www.nowcoder.com/acm/contest/81/E 给一个1-base数组{a},有N次操作,每次操作会使一个位置无效.一个区间的权值定义为这个区间里选出一些数的异或和 ...

  3. Codeforces Round #400

    最近好像总是有点不想打,专题也刷不动,还是坚持这做了一场,虽然打到一半就没打了...(反正通常都只能做出两题) 感觉自己切水题越来越熟练了,然而难题还是不会做.. A题,水,用vector存下来就行了 ...

  4. Codeforces Round #409

    第一题很水但是wa了一发,因为没考虑K前面是K的情况 #include<map> #include<set> #include<cmath> #include< ...

  5. Linux 挂载系统盘

    适用系统:非IO优化+SSD云盘Linux(Redhat , CentOS,Debian,Ubuntu)实例,IO优化实例+SSD云盘数据盘分区挂载建议使用脚本:工具:auto_fdisk_ssd.s ...

  6. vue 可编辑表格组件

    <template> <div class="table"> <table border="1px" v-dragform> ...

  7. 【jQuery】IE9 jQuery 1.9.1 报 Syntax error,unrecognized expression 错误

    <script type="ctrip-template-x" id="ctrip-page-index"> <article class=& ...

  8. python decorator 装饰器

    python装饰器是个对嵌套函数的语法糖 作用是在函数调用方法不变的情况下,将函数包装成另一个函数来使用 ---- import time def sum1(): sum = 1 + 2 print ...

  9. 2018.11.15 RF antenna impedance-matching

    We have studied the impedance-matching of RF transmission line between the antenna and the RX / TX m ...

  10. Android程序员学WEB前端(2)-HTML(2)-锚点链接列表表单-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76522417觉得博文有用,请点赞,请评论,请关注,谢谢!~锚点 链接 列表 表单 &l ...