【UML】《Theach yourself uml in 24hours》——hour2&hour3

一、Hour2主要内容

1、如何理解目标导向(Object-oriented mideset)
2、对象之间如何交流(communicate)
3、对象之间如何关联(associate)
4、对象之间如何结合(combine)

The purpose of object-orientation is to develop software that refects a paticular slice of the world.The more attributes and behaviors you take account ,the more your model will be in tune with reality.
面向对象的目的是开发能够反应世界某一部分的软件。你考虑的属性和行为越多,你的模型就越符合现实。
object-orientation goes beyond just modeling attributes and behavior.It considers other aspects of objects as well.
面向对象不仅仅是建模属性和行为。它也考虑对象的其他方面。这些方面是:

  • 抽象 abstraction
    Abstraction means, simply,to filter out an object’s properties and operations until just the ones you need are left.
    抽象意味着,简单地说,过滤掉对象的属性和操作,直到只剩下您需要的属性和操作。

  • 继承 inheritance

  • 多态 polymorphism
    Sometimes an operation has the same name in different classes.this is called polymorphism

  • 封装 encapsulation
    when an object carries out its operations,those operations are hidden
    以及三个其它比较重要的东西:

  • 消息发送 message sending
    对象之间一起合作,需要通过彼此减发送消息来实现。

  • 关联 associations
    对象通常以某种方式相互关联,比如你打开了电视机,用面向对象的术语来讲你就与电视机产生了关联.
    方向要基于实际意义,也可以没有方向
    在这里插入图片描述

  • 聚合 aggregation
    比如电脑是由cpu、内存、硬盘等组合起来的,这种情况成为聚合。
    composition和aggregation的区别是,前者聚合对象与其组件对象之间是强关系。比如一件T恤由扣子、衣领等组成,把衬衫扔掉,领子就没用了(Do away with the shirt and the collar becomes useless)。

面向对象的最主要作用:
The important thing is to use the concepts of object-orientation to help you understand the client’s area of knowledge(his or her domain),and to illustrate your understanding to the client in terms that he or she understands
使用面向对象的概念重要的是来帮助您理解客户的知识领域(他或她的领域),并用客户理解的术语向客户说明您的理解.

二、Hour3主要内容

1、如何制作类图
2、如何展示一个类的特征(features)、作用(responsibilities)、限制条件(constraints)
3、如何发现类

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
如何发现类
Classes are the vocabulary and terminology of an area of knowledge. As you talk with clients, analyze their area of knowledge,and design computer systems that solve problems in that area,you learn the terminology and model the termsas classes in the UML.
类是一个知识领域的词汇和术语。当您与客户交谈,分析他们的知识领域,并设计解决该领域问题的计算机系统时,您将会学习到这些术语并在UML中为termsas类建模。
In your conversations with clients,be alert to the nouns they use to describe the entities in their business,.those nouns will become the classes in your model. Be alert to the verbs that you hear because these will constitute the operations in those classes.The attributes will emerge as nouns related to the class nouns.After you have a core list of classes,question the clients as to what each class is supposed to do within the business.Their answers will tell you the class responsibilities.
在与客户的对话中,注意他们用来描述业务实体的名词。这些名词将成为模型中的类。 注意所听到的动词,因为它们将构成这些类中的方法。与类名词相关的名词将作为属性。在有了核心类列表之后,询问客户每个类应该做什么 他们的答案会告诉这些类的职责。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值