欢迎来到天天文库
浏览记录
ID:45078844
大小:374.50 KB
页数:35页
时间:2019-11-09
《uml与面向对象系统分析与设计与java7》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第五讲:概念设计:服务与UML动态图表249对象责任Responsibilities属性-“我知道什么”关系-“我知道的其他类和对象”服务-“我能作什么”250Operations服务同义词:方法,功能&操作定义:Actionsperformedtofulfillthepurposeoftheinformationsystemandmeettheneedsoftheuser.满足信息系统的目的和用户需要的活动是对一个事件的响应:外部事件-商业活动内部事件-为完成目的而进行的消息传送251服务的类型基本B
2、asic-默认的创建一个对象搜索一个对象获取和设置属性值建立或取消对象关联对象删除问题域–specifictothedomainbeingstudied252模版类名操作属性类名1)基本操作2)问题域方法-继承-自定属性-继承-自定考虑…253问题域服务例子学生课程登记课程改修请求成绩单交费etc...studentIDNumberstudentNameetc...下一个.…基本服务例子...254NEW操作例子StudentattributesoperationsStudent1Student2Stu
3、dent3StudentattributesoperationsStudent1Student2Student3Student4newStudent原来后来Note:Allbasicoperationexamplesareforillustrationonlyaseachimplementationlanguagehandlesthemdifferently255SEARCH操作例子#1学生attributesoperations学生1学生2学生3search[Student,studentIDNumb
4、er=123-45-6789]Studentattributesoperations学生1学生2学生3StudentIDNumber:123-45-6789256SEARCH操作例子#2StudentattributesoperationsStudent1Student2Student3search[Student,studentName=“Smith”]Student1Student2Student3StudentName:Smith,MaryStudentName:Smith,JohnStudent
5、attributesoperations257GET操作例子StudentattributesoperationsStudent1Student2Student3telephone:(619)588-3296get[Student=“Student2”,telephone]result:telephone=(619)588-3296258SET操作例子StudentattributesoperationsStudent1Student2Student3set[Student,telephone,(619
6、)594-3736]telephone:(619)588-3296StudentattributesoperationsStudent1Student2Student3telephone:(619)594-3736beforeafter259CONNECT操作例子StudentClubattributesoperationsACMClubBetaSigmaPiClubAITPClubconnect[StudentClub=AITPClub,ClubMember=AITP-StudentN]ClubMem
7、berattributesoperationsACM-Student1ACM-StudentNBSP-Student1BSP-StudentNAITP-Student1AITP-StudentN260DISCONNECT操作例子StudentClubattributesoperationsACMClubBetaSigmaPiClubAITPClubdisconnect[StudentClub=AITPClub,ClubMember=AITP-StudentN]ClubMemberattributesop
8、erationsACM-Student1ACM-StudentNBSP-Student1BSP-StudentNAITP-Student1AITP-StudentN261DELETE操作例子StudentattributesoperationsStudent1Student2Student3StudentattributesoperationsStudent1Student3delete[Student2]beforeafter262问题域
此文档下载收益归作者所有