复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 18 - 使用GRASP的对象设计示例

Chapter 18 使用 GRASP的对象设计示例98 ●●●●● ●●●● ●●。●●
Chapter 18 使用GRASP的对象设计示例

●●● ●●●●● ●●●● 大纲 ●●●● ●●●● ●●0● ●用例实现 ●应用 GRASP为类分配职责 ●应用UML阐述和思考对象的设计
大纲 ⚫ 用例实现 ⚫ 应用GRASP为类分配职责 ⚫ 应用UML阐述和思考对象的设计

●●● 什么是用例实现 ●●●●● ●●●● ●●●●● ●●●● ●●0● 用例如何在设计模型中实现 ystem as black box the name could be "NextGenPOS"but"System"keeps it the":and underline imply an instance, and are explained in a ater chapter on sequence diagram notation in the UML Process sale Scenario Cashier makeNewsale a UML loop oop丿 more items interaction enterltem (itemID, quantity) a boolean guard expression description, total end sale ssociated with the it is an abstraction previous message representing the an abstraction that ystem event of make Payment(amount). some mechanism the return line is change due, receipt not returned
什么是用例实现 ⚫ 用例如何在设计模型中实现 enterItem(itemID, quantity) : Cashier :System endSale makePayment(amount) a UML loop interaction frame, with a boolean guard expression external actor to system Process Sale Scenario system as black box the name could be "NextGenPOS" but "System" keeps it simple the ":" and underline imply an instance, and are explained in a later chapter on sequence diagram notation in the UML a message with parameters it is an abstraction representing the system event of entering the payment data by some mechanism description, total return value(s) associated with the previous message an abstraction that ignores presentation and medium the return line is optional if nothing is returned total with taxes change due, receipt makeNewSale loop [ more items ]

●●● ●●●●● ●●●● 系统事件 ●●●● ●●●● ●●0● makeNewSale, etc, are the system operations from the SSD each major interaction diagram starts with a system operation going into a domain layer controller object, such as Register makeNewSale Register ??? Window objects GUI widget objects enterltem Registe 1:??? Web control objects endSale -+ Register 1:??? makePayment Register 1:??? UI LAYER DOMAIN LAYER
系统事件 :Register enterItem :Register endSale :Register makePayment 1: ??? 1: ??? 1: ??? :Register makeNewSale 1: ??? makeNewSale, etc., are the system operations from the SSD each major interaction diagram starts with a system operation going into a domain layer controller object, such as Register UI LAYER DOMAIN LAYER Window objects or GUI widget objects or Web control objects . .

●●● ●●●●● ●●●● 用例实现 ●●●● ●●●● ●●0● makeNewSale create Sale Window objects GUI widget objects Web control objects Register ProductCatalog enterltem(…) desc getProductDesc( itemID LAYER DOMAIN LAYER
用例实现 : Register : Sale makeNewSale create : Register enterItem(...) : ProductCatalog desc = getProductDesc( itemID ) . . . UI LAYER Window objects or GUI widget objects or Web control objects . . . DOMAIN LAYER

●●●●● ●●●● Records-sale-of ●●●●● ●●●● Described-b ●●0● Product Product Specificati pnce itemID Used-b Describ Sales Lineltem Store tem name 1 Contained-In Logs- completed 1 Houses Sale Started-by Manager time Paid-b itiated-by 4 Records-sales-on Payment Customer Ca ashier
领域模型

●●● ●●●●● ●●●● 如何实现 make Newsale ●●●●● ●●●● ●●0● ●契约(后置条件) ●创建了Sae的实例s ●s被关联到 Register s的属性被初始化 选择控制器 类型1还是类型2?
如何实现makeNewSale ⚫ 契约(后置条件) ⚫ 创建了Sale的实例s ⚫ s被关联到Register ⚫ s的属性被初始化 ⚫ 选择控制器 ⚫ 类型1还是类型2?

●●● ●●●●● ●●●● 如何实现 make Newsale ●●●● ●●●● ●●0● by creator and Controller Register creates a Sale by creator by Creator, sale Registe reates an empt collection(such as a List) which wil‖l eventually hold Saleslineltem makeNewSale instances create create lineltems List this execution specification is implie within the constructor of the sale instance
如何实现makeNewSale :Register makeNewSale :Sale create Register creates a Sale by Creator create lineItems : List by Creator, Sale creates an empty collection (such as a List) which will eventually hold SalesLineItem instances by Creator and Controller this execution specification is implied to be within the constructor of the Sale instance

●●●●● ●●●● 如何实现 enterltem ●●●●● ●●●● ●●0● the name could be "NextGenPOS"but"System"keeps it the":and underline imply an instance, and are explained in a ater chapter on sequence diagram notation in the UML Process sale Scenario Cashier makeNewsale a UML loop oop丿 more items interaction enterltem (itemID, quantity) a expression description, total end sale ssociated with the it is an abstraction previous message representing the an abstraction that ystem event of make Payment(amount). not returned
如何实现enterItem enterItem(itemID, quantity) : Cashier :System endSale makePayment(amount) a UML loop interaction frame, with a boolean guard expression external actor to system Process Sale Scenario system as black box the name could be "NextGenPOS" but "System" keeps it simple the ":" and underline imply an instance, and are explained in a later chapter on sequence diagram notation in the UML a message with parameters it is an abstraction representing the system event of entering the payment data by some mechanism description, total return value(s) associated with the previous message an abstraction that ignores presentation and medium the return line is optional if nothing is returned total with taxes change due, receipt makeNewSale loop [ more items ]

●●● ●●●●● ●●●● 如何实现 enterltem ●●●● ●●●● ●●0● ●契约(后置条件) ●创建了 Sales lineltem的实例sli ●s被关联到当前的Sa|e ● sli quantity!赋值为 quantity 基于temD的匹配,s被关联到 ProductDescription ●控制器类的选择
如何实现enterItem ⚫ 契约(后置条件) ⚫ 创建了SalesLineItem的实例sli ⚫ sli被关联到当前的Sale ⚫ sli.quantity赋值为quantity ⚫ 基于itemID的匹配,sli被关联到ProductDescription ⚫ 控制器类的选择
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 17 - GRASP基于职责设计对象.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 16 - UML类图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 15 - UML交互图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 14 - 迈向对象设计.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 13 - 逻辑架构和UML包图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 11 - 操作契约.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 10 - 系统顺序图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 9 - 领域模型.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 8 - 细化阶段的迭代——基础.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 7 - 其他需求.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 6 - 用例.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 4 Chapter 5 - 初始阶段的需求.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 3 - 案例分析 THE NEXTGEN POS SYSTEM.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_OOP:Object-Oriented Programming.pptx
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 2 - 迭代、进化和敏捷.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 1 - 面向对象分析和设计.ppt
- 复旦大学:《面向对象分析和设计》课程资料_课程注册系统_9-11 UC Design、Subsystem Design、Class Design.pdf
- 复旦大学:《面向对象分析和设计》课程资料_课程注册系统_6-8 Identify Design Elements、RunTime Architecture、Describe Distribution.pdf
- 复旦大学:《面向对象分析和设计》课程资料_课程注册系统_1-5 最佳实践、需求、分析设计、架构分析、用例分析.pdf
- 复旦大学:《面向对象分析和设计》课程资料_Exception handling refactorings.pdf
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 19 Chapter 20 Chapter 22.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 21 测试驱动的开发与重构.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_复习:OOAD部分.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_AOP Aspect Oriented Programming.pptx
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Hibernate Persistence.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Hibernate 演示场景.pptx
- 复旦大学:《电子商务》课程资源_教学大纲.pdf
- 复旦大学:《电子商务》课程资源_教学案例:The Business Model-Recent Developments and Future Research-JOM2011.pdf
- 复旦大学:《电子商务》课程资源_教学研究:Online Game Addiction among Adolescents_Motivation and Prevention Factors.pdf
- 复旦大学:《电子商务》课程资源_教学研究:Research On The Utility Of An Advanced ACA In Context-Aware Tour Planning System.pdf
- 复旦大学:《电子商务》课程PPT课件_第二次课 电子商务的商业模式与分类.ppt
- 复旦大学:《电子商务》课程PPT课件_第一次课 引言(胥正川).ppt
- 复旦大学:《电子商务》课程PPT课件_第三次课 电子商务过程及相关因素(电子商务创业).ppt
- 复旦大学:《电子商务》课程PPT课件_第四次课 电子商务商业计划书写作 Creating a Winning E-Business Second Edition.ppt
- 复旦大学:《电子商务》课程PPT课件_第七次课 B2C电子商务——网上零售.pptx
- 复旦大学:《电子商务》课程PPT课件_第九次课 B2B电子商务(B2B行业平台).ppt
- 复旦大学:《电子商务》课程PPT课件_第五次课 商业模式的概念与内涵(发现商业模式).ppt
- 复旦大学:《电子商务》课程PPT课件_第八次课 电子商务模式与应用课程主题案例分析与展示——电子商务团购.ppt
- 复旦大学:《电子商务》课程PPT课件_第六次课 电子商务运营与管理 Getting Your E-Business Off The Ground.ppt
- 复旦大学:《电子商务》课程PPT课件_第六次课 电子商务运营与管理 Operating Your E-Business.ppt