Student_Answers_Chapter_02.doc

上传人:11****ws 文档编号:2993814 上传时间:2019-05-16 格式:DOC 页数:3 大小:174.50KB
下载 相关 举报
Student_Answers_Chapter_02.doc_第1页
第1页 / 共3页
Student_Answers_Chapter_02.doc_第2页
第2页 / 共3页
Student_Answers_Chapter_02.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、Suggested answer for Exercise 2.1The class diagram is shown below. Note the following: 1. Fields in the Java classes that store references to other objects are shown in UML as associations between the classes, not as attributes. 2. The cost function in the Component class is abstract: this is shown

2、in UML by writing it in an italic font, as with the class itself.Suggested answer for Exercise 2.2(a) The diagram below uses the names of the variables in the code as object names. Although this probably clarifies the current example, it runs the risk of confusing the two distinct concepts of object

3、 name and variable name. This is potentially dangerous in an environment where objects are reassigned to different variables. This diagram illustrates the different numbers of part objects that can exist for a catalogue entry: zero, one or many. (b) Apart from the assembly object, all the objects in this diagram have already appeared in the answer to part (a). (c) A client object has been added in this diagram, shown as sending the initial cost message to the assembly.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 实用文档资料库 > 策划方案

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。