复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 11 - 操作契约

Chapter 11 操作契约
Chapter 11 操作契约

我们在哪儿 em Domain Sequence Operation Transition Modeling Diagrams Contracts to Design Architecture
我们在哪儿

Modeling date quantity Vision Use-Case Model ♀、< arnves names Require-i Use Case Diagre Use Case Text ments the doma the post- events attributes conditions/ associations at underg make Supplementary Post-conditions ( id, quantity) Operation Contracts System Sequence Diagrams requirements that Design Mode must be satisfied Product catalog Design
Operation: enterItem(…) Post-conditions: - . . . Operation Contracts Sale date . . . Sales LineItem quantity 1 1..* . . . . . . Domain Model Use-Case Model Design Model : Register enterItem (itemID, quantity) : ProductCatalog spec = getProductSpec( itemID ) addLineItem( spec, quantity ) : Sale Requirements Business Modeling Design Sample UP Artifact Relationships : System enterItem (id, quantity) Use Case Text System Sequence Diagrams make NewSale() system events Cashier Process Sale : Cashier use case names system operations Use Case Diagram Vision Supplementary Specification Glossary starting events to design for, and more detailed requirements that must be satisfied by the software Process Sale 1. Customer arrives ... 2. ... 3. Cashier enters item identifier. the domain objects, attributes, and associations that undergo changes requirements that must be satisfied by the software ideas for the postconditions

目标 口确定系统操作 口为系统操作创建契约
目标 确定系统操作 为系统操作创建契约

为什么需要操作契约 口用例和SSD是用来描述系统行为的主要方式,在 大多数情况下足以满足需求。 口有时需要对系统行为进行更为详细和精确的描述 口操作契约用于描述领域模型里对象的详细变化, 作为系统操作的结果
为什么需要操作契约 用例和SSD是用来描述系统行为的主要方式,在 大多数情况下足以满足需求。 有时需要对系统行为进行更为详细和精确的描述 操作契约用于描述领域模型里对象的详细变化, 作为系统操作的结果

什么是系统操作 口在SSD中定义了系统事件,而一个系统事件可以 通过一个系统操作来实现 口将所有用例的系统操作的完整集合封装到一个类 中,这个类定义了系统对外界的公共接口
什么是系统操作 在SSD中定义了系统事件,而一个系统事件可以 通过一个系统操作来实现。 将所有用例的系统操作的完整集合封装到一个类 中,这个类定义了系统对外界的公共接口

系统操作处理输入的系统事件 Process sale Scenario System Cashier makeNewsale0O… loop /[more items 1 enterltem(itemID, quantity) O these input system events evoke system operations the system event enterltem description, total invokes a system operation called enterltem and so forth endsaleo o-s is is the same as in object oriented programming when we say the message foo invokes the method(handling total with taxes operation) foo make Payment (amount change due, receipt
系统操作处理输入的系统事件 : Cashier enterItem(itemID, quantity) endSale() makePayment(amount) description, total total with taxes change due, receipt makeNewSale() these input system events invoke system operations the system event enterItem invokes a system operation called enterItem and so forth this is the same as in objectoriented programming when we say the message foo invokes the method (handling operation) foo loop [ more items ] :System Process Sale Scenario

系统操作契约示例 口操作: enteritem( itemID: ItemID quantity: integer) 口交叉引用:处理销售用例 口前置条件:有一个正在进行的销售 口后置条件 创建了 Salelinelten的实例si(创建实例) Si与当前的Sale关联(形成关联) sli. quantity赋值为 quantity(修改属性) 基于 itemID的匹配,将Si关联到 Production Description(形成关联)
系统操作契约示例 操作: enterItem(itemID: ItemID, quantity: integer) 交叉引用:处理销售用例 前置条件:有一个正在进行的销售 后置条件: ◼ 创建了SaleLineItem的实例sli(创建实例) ◼ sli与当前的Sale关联(形成关联) ◼ sli.quantity赋值为quantity(修改属性) ◼ 基于itemID的匹配,将sli关联到 ProductionDescription(形成关联)

操作契约 口系统操作可以进一步通过操作契约来说明 口操作契约包括前置条件和后置条件。 口前置条件表述了操作前系统应该处于的状态 口后置条件 ■表述了操作后,领域模型内对象状态的变化。领域模 型状态的变化包括创建实例,形成或消除关联以及改 变属性。 后置条件不是在操作过程中执行的活动,它们是对领 域模型对象的观察结果
操作契约 系统操作可以进一步通过操作契约来说明。 操作契约包括前置条件和后置条件。 前置条件表述了操作前系统应该处于的状态 后置条件 ◼ 表述了操作后,领域模型内对象状态的变化。领域模 型状态的变化包括创建实例,形成或消除关联以及改 变属性。 ◼ 后置条件不是在操作过程中执行的活动,它们是对领 域模型对象的观察结果

Described-bt Product Specificatio Catalog description itemID Used-b Describ Sales Lineltem Store Item quantity address name 1 Contained completed Houses Sale Register date Started-by/ Manager time Paid-by 1 Initiated-by 4 Records-sales-on Payment Customer Cashier amount
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《面向对象分析和设计》课程资料_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
- 复旦大学:《面向对象分析和设计》课程资料_Error Handling.pdf
- 复旦大学:《面向对象分析和设计》课程资料_AntiPattern_2.Servlet.pdf
- 复旦大学:《面向对象分析和设计》课程资料_AntiPattern_1.JSP J2EE Refactoring Patterns/AntiPatterns.pdf
- 复旦大学:《面向对象分析和设计》课程资料_分析模式_责任模式 Accountability.pdf
- 复旦大学:《面向对象分析和设计》课程资料_分析模式_观察和测量模式.pptx
- 复旦大学:《面向对象分析和设计》课程资料_UML&GRASP_UMLProfile.pdf
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 13 - 逻辑架构和UML包图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 14 - 迈向对象设计.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 15 - UML交互图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 16 - UML类图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 17 - GRASP基于职责设计对象.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 18 - 使用GRASP的对象设计示例.ppt
- 复旦大学:《面向对象分析和设计》课程资料_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