当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

复旦大学:《面向对象分析和设计》课程资料_UML&GRASP_3.5 Iteration 1 实现模型

资源类别:文库,文档格式:PPT,文档页数:65,文件大小:4.51MB,团购合买
点击下载完整版文档(PPT)

实现模型 徐迎晓 xuyingxiao@126.com 复旦大学软件学院

实现模型 徐迎晓 xuyingxiao@126.com 复旦大学软件学院

实现模型 输入:设计过程的制品/交互图,设计类 可边设计边编程 对2周的迭代,考虑靠近迭代开始的半天 做可视化建模设计工作,再进入编程 ●设计得到的是不完整的结果,编程和测 试时会有大量修改,并发现和解决大量 细节问题

实现模型 输入:设计过程的制品(交互图,设计类 图) 可边设计边编程 对2周的迭代,考虑靠近迭代开始的半天 做可视化建模设计工作,再进入编程 设计得到的是不完整的结果,编程和测 试时会有大量修改,并发现和解决大量 细节问题

实现模型 MAPPING DESIGNS TO CODE Testing Refactoring 9 Component Diagram e Deployment Diagram

实现模型 MAPPING DESIGNS TO CODE Testing & Refactoring Component Diagram Deployment Diagram

MAPPING DESIGNS TO CODE public class Sales Lineltem private int quantity public SalsLineltem(ProductSpecification spec, int qty)(.3 public Money get([.J Productspecification Sales lineltem description: Text quantity: Integer Described-by price: Money itemID: ItemID get Subtotal: Money o

MAPPING DESIGNS TO CODE

public class Sales Linelter Simple attribute ..,.*.o private int quantity Reference attribute\ ...,..o private Product Specification product Spec, public Sales Lineltem(ProductSpecification spec, int qty)i public Money get Subtotal..) Product Specification Sales lineltem description: Text quantity: Integer Described-bt price: Money 1 itemID: ItemID get Subtotal: Money Figure 20.3 Adding reference attributes

public class SalesLineltem private int quantity private Product specification product Spec Productspecification SalesLineltem description: Text quantity: Integer Described-bt price: Money productSpec itemID: ItemID get Subtotal(: Money Role name used in attribute name Figure 20. 4 Role names may be used to generate instance variable names

Sale public class Sale date: Date private Date date Time= new Date…}…… is Complete: Boolean time: Time become ompleteO makeLineltemo makePaymentO In Java, the java util. Date class combines both date arpd l getTtotalo timestamp information. Therefore, the separate attributes in the design can be collapsed when mapping Figure 20.5 Mapping date and time to Java

ProductSpecification spec catalog get Specification(id) ale. makeLineltem(spec, gty) enterltem(id, qty+ 2: makeLineltem(spec, gtyt e Registe Sale 1: spec: get Specification(id Produc Figure 20.8 The enterltem method

Sale public class Sale date: Date is Complete: Boolean SalesLineltem time: Time Contains private List lineltems =new Array List O quantity: Integer become Complete make Lineltemo I getSubtotalO make Payment( getT total A collection class is necessary to\. maintain attribute vis ibility to all the SalesLineltems Figure 20. Adding a collection

●实现的顺序

实现的顺序

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共65页,可试读20页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有