CRC

   又称为CRC索引卡片:CRC card

   每张卡片代表一个类 Each card represents one class

   每张卡片上写出这个类承担的职责、与其合作交互的其他类名

     CRC cards are paper index cards on which one writes the responsibilities and collaborators of classes

   CRC建模讨论会

     a group sitting around a table, discussing and writing on the cards as they play "what if" scenarios with the objects

     considering what they must do and what other objects they must collaborate with

     例如,废品回收机
   CRC 的特点

     非正式的、不是很细节的 Informal, non-detailed

     采用小组“头脑风暴”的形式提出概念 Used for group brain-storming

     CRC的目标不是提供完整的设计 Not intended to provide a complete design

     CRC产生的结果需要进一步精化 End result is a first cut at classes for an object-oriented model
CRC 的输入信息: 用例模型

   用例模型

     用例图、边界、用例描述,清楚 地描述了系统需求,作为CRC概 念类分析的起点

    A good starting point for CRC analysis is a clear statement of all of the use-cases

       Use-cases drive the introduction of CRC cards

     用例描述的正常事件流、异常事件流, 可以作为CRC的“角色扮演”的脚本

       Use-cases, or their accompanying scenarios, can be used as a kind of script for the role-playing method (角 色扮演)of checking the CRC cards

     “角色扮演”也可以用顺序图来代替 The role-playing could be replaced with sequence diagrams

CRC方法建模的一些规则

  CRC指导

     Who Writes CRC Cards?

       No one individual has all needed knowledge

       Best to write CRC cards as a team, rather than individually

       Analysis team should consist of five or six experienced individuals :

         one or two user domain experts

         one or two systems analysts

         one OO software designer

         one team facilitator and leader 一位引导者

         The team can include clients 客户 as well as developers

       小的团队关注点比较集中,大的团队很难给出一致意见 Smaller teams lack diversity, larger teams make consensus difficult to achieve        仲裁者具备OO技能以及团队引导能力,不是“老板”型

        Facilitator should be skilled at OO and group techniques, not be a "boss" of team

       围绕团队的提议来写CRC Writing of CRC cards focuses team activities

         切忌跑题:参见1994年春晚_相声《跑题》关于开会的会风问题…
     头脑风暴 Brainstorming

       Groups work by

         收集各种各样的想法,比较这些想法并进行合成

       A "brainstorming" session is a good way to collect the ideas quickly and creatively

     头脑风暴的原则 Brainstorming principles

       All ideas are potentially good ideas

         Don't censure(责难) yourself or others -- all ideas are equal

       Think fast and furiously激烈; ponder(沉思)later

         A fast-paced discussion encourages individual creativity

       Give every voice a turn

         Include everyone in the group. Don't let the loudmouths dominate.

       A little humor can be a powerful force

         Humor can help break down barriers, relieve tension, and build trust needed for a cohesive and effective group
     头脑风暴的步骤

       会议分阶段,每阶段目标明确 State session objectives.

        Each session should have a precise objective--clear to all and narrow enough to accomplish in the session

         Avoid digression (离题) from the objective

       使用“轮转”机制 Use a round-robin technique

         Go around the group from individual to individual

         Individuals may "pass" if they have nothing to contribute

         Stop when no one has anything to contribute

       讨论与选择 Discuss and select

         一致同意的 Restate the objective, then identify those items that everyone agrees are "winners"

         一致反对的 Then select those items that everyone disagrees are "losers"

         需要进一步讨论的 Then discuss the items remaining--the "maybes"

       设置“时间盒”

         在规定的时间间隔内有结论:或者完成、或者延迟到有进一步的信息到来,等等
     在“头脑风暴”开始之前,收集概念类可能的来源

       每个参与者要完成一些调查、分析任务

       阅读所有的需求文档 Read all requirements documents

         Examine the formal requirements document (if any)

         Don't overlook the indirect sources -- memos, meeting minutes, etc.

         Circle nouns and noun phrases -- these are potential classes

       仔细阅读各类报告 Look carefully at reports

         Examine the reports generated in the system being replaced (manual or automated)

         Examine the profiles for the reports desired in the new system

         Again circle nouns and noun phrases -- these are potential classes

       做一些访谈 Conduct interviews

         Talk to experienced users of the current system

         Record interview or take careful, precise notes

         Again identify nouns and noun phrases as candidate classes
     概念类可能的来源 Sources for the Candidate Classes

       检查其他的文档和文件 Examine documentation and files

         当前系统的有关文件 Review the documentation on the current system

         尝试收集用户、维护人员手里所拥有的非官方的、或者私人的笔记等

          Try to review any unofficial or personal notes users or maintainers of the system have

         同样的,在里面寻找名称 Again identify nouns and noun phrases as candidate classes
  CRC寻找结束后 …

     “角色扮演”验证 概念类 Team can engage in role-playing to verify that use-case scenarios make sense for chosen CRC

     每个人可以扮演1到多个类 Each person can role-play one or more class cards

     如果哪里不顺畅,立即修改 If something doesn’t work, change the class accordingly

     或者,去修改用例!(需求定义错了哦)Revision of use-cases might also be indicated

4.2 面向对象分析(二) CRC方法标识概念类的更多相关文章

  1. 面向对象相关概念与在python中的面向对象知识(魔法方法+反射+元类+鸭子类型)

    面向对象知识 封装 封装的原理是,其成员变量代表对象的属性,方法代表这个对象的动作真正的封装是,经过深入的思考,做出良好的抽象(设计属性时用到),给出“完整且最小”的接口,并使得内部细节可以对外透明( ...

  2. python面向对象双下划线方法与元类

    目录 双下划线方法(__) 元类简介 产生类的两种表现形式 元类的基本使用 元类进阶操作 __new__方法 双下划线方法(__) 面向对象中的双下方法也有一些人称之为是魔法方法,有些双下方法不需要刻 ...

  3. Python 基础之面向对象之类中的方法和与类相关的魔术属性以及反射

    一.类中的方法 普通方法: 没有参数,只能类调用绑定方法: (1)绑定到对象(自动传递对象参数) (2)绑定到类(自动传递参数)静态方法: 无论是类还是对象,都能调用的方法#例:class Dog() ...

  4. 101 01 Android 零基础入门 02 Java面向对象 03 综合案例(学生信息管理) 02 案例分析及实现 05 通过方法实现学生类与专业类关联——方案二

    101 01 Android 零基础入门 02 Java面向对象 03 综合案例(学生信息管理) 02 案例分析及实现 05 通过方法实现学生类与专业类关联--方案二 本文知识点:通过方法实现学生类与 ...

  5. <二>面向对象分析之几个关键的概念

    一:建模        --->建模,是指通过对[客观事物]建立一种抽象的方法用以表征事物并获得对事物本身的理解.同时把这种理解概念化,将这些逻辑概念组织起来,构成一种对所观察对象的内部结构和工 ...

  6. 面向对象分析方法(I)

    找出最关键的一些业务场景:一般通过动词来寻找,比如招聘系统中,一个应聘人投递一个职位就是一次应聘,应聘就是一个业务场景:一个学生参加某门课的考试,那么考试就是一个业务场景:一个学生去图书馆借书,那么借 ...

  7. <九>面向对象分析之UML核心元素之设计类,类,属性,方法,可见性

    设计类

  8. 面向对象分析设计-------02UML+UML各种图形及作用

    一.UML是什么?UML有什么用? 二.UML的历史 三.UML的上层结构(Superstructure) 四.UML建模工具 五.UML的图(重点) 1.用例图(use case diagram) ...

  9. SNMP报文抓取与分析(二)

    SNMP报文抓取与分析(二) SNMP报文抓取与分析(二) 1.SNMP报文表示简介 基本编码规则BER 标识域Tag表示 长度域length表示 2.SNMP报文详细分析(以一个get-respon ...

随机推荐

  1. bsgs整理

    目录 bsgs问题 或 poj2417: 概述 代码 exbsgs 鸣谢 \(gzy gzy gzy\) bsgs问题 或 poj2417: 给定质数\(p\),给定\(a\),\(b\),\((a, ...

  2. Java 使用命令对堆线程分析

    一.dump基本概念 在故障定位(尤其是out of memory)和性能分析的时候,经常会用到一些文件来帮助我们排除代码问题.这些文件记录了JVM运行期间的内存占用.线程执行等情况,这就是我们常说的 ...

  3. P4213 【模板】杜教筛(Sum)(杜教筛)

    根据狄利克雷卷积的性质,可以在低于线性时间复杂度的情况下,求积性函数前缀和 公式 \[ 求\sum_{i=1}^{n}\mu(i) \] 因为\(\mu*I=\epsilon\) 所以设\(h=\mu ...

  4. Kafka、RabbitMQ、RocketMQ等消息中间件的对比

    Kafka 是LinkedIn开源的分布式发布-订阅消息系统,目前归属于Apache定级项目.Kafka主要特点是基于Pull的模式来处理消息消费,追求高吞吐量,一开始的目的就是用于日志收集和传输.0 ...

  5. PTA 7-2 列车调度(25 分)

    7-2 列车调度(25 分) 火车站的列车调度铁轨的结构如下图所示. 两端分别是一条入口(Entrance)轨道和一条出口(Exit)轨道,它们之间有N条平行的轨道.每趟列车从入口可以选择任意一条轨道 ...

  6. python爬虫训练——爬poj题目

    首先要解决的就是不同的题目在不同的页上,也就是要实现翻页功能,自动获取所要爬取的地址,通过分析可以得出不同的页面也就是volume=后面的数字不同 所以我们可以用re模块来替换即可: new_url ...

  7. 无法启动此程序,因为计算机中丢失api-ms-win-crt-runtime-|1-1-0.dll

    今天想把自己电脑上的python2换成python3时,安装完python3后,命令行启动时需要出现了上述错误,在网上查了资料后应该是库文件遭到了破坏,于是我下了一个东西安装后就解决了,如果出现了此问 ...

  8. IDEA @Autowired 出现红色下划线 报红

    例如: 解决方法:

  9. leetcode 查找每个元素都出现两次的列表,返回只出现一次的元素

    Given an array of integers, every element appears # twice except for one. Find that single one. clas ...

  10. ztree异步加载树节点

    参考文档:https://www.cnblogs.com/tenWood/p/8620708.html ztree api地址:http://www.treejs.cn/v3/api.php 说明:j ...