中国高校课件下载中心 》 教学资源 》 大学文库

复旦大学:《面向对象分析和设计》课程资料_分析模式_责任模式 Accountability

文档信息
资源类别:文库
文档格式:PDF
文档页数:96
文件大小:3.86MB
团购合买:点击进入团购
内容简介
复旦大学:《面向对象分析和设计》课程资料_分析模式_责任模式 Accountability
刷新页面文档预览

责任模式 Accountability 徐迎晓 复旦大学软件学院 xuyingxiao@126.com

责任模式 Accountability 徐迎晓 复旦大学软件学院 xuyingxiao@126.com

1 Party

1. Party

Example: .A telephone utility's customers may be individuals or businesses. Many aspects of dealing with customers are the same in which case they are treated as parties Where they differ they are treated through their subtype

Example: A telephone utility’s customers may be individuals or businesses. Many aspects of dealing with customers are the same, in which case they are treated as parties. Where they differ they are treated through their subtype

0.1 Telephone Numb 0.1 Person Address Organ ization 0.1 E-mail Address

0.1 Telephone Numbe Person 0.1 Address Organ ization 0.1 E-mail Address

Party Pattern An abstraction of people and organizational units Person Organization

Party Pattern

e Put any behaviror that is common to people and organizational units on Party, only put things particular to one or the other on the subtype e When you put behavior on the subtype think about whether it makes sense on the supertype

Put any behaviror that is common to people and organizational units on Party, only put things particular to one or the other on the subtype When you put behavior on the subtype, think about whether it makes sense on the supertype

When to use it . when you have people and organizations in your model and you see common behavior C when you don' t need to distinguish between people and organizations In this case it's useful just to define a party class and not to provide the subtypes

When to use it when you have people and organizations in your model and you see common behavior when you don’t need to distinguish between people and organizations. In this case it’s useful just to define a party class and not to provide the subtypes

Main Point e The main point of this pattern is to look for it to see if you have common behavior and if so to use the name Party for that supertype 9 The name has become quite widely used these days, so choosing that name helps in communication

Main Point The main point of this pattern is to look for it to see if you have common behavior, and if so to use the name Party for that supertype. The name has become quite widely used these days, so choosing that name helps in communication

2 Organization Hierarchy

2. Organization Hierarchy

刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档