L00 Course Introduction
L00 Course Introduction
L00 Course Introduction
& Design
面向对象的分析与设计
修佳鹏
[email protected]
计算机学院(国家示范性软件学院)
北京邮电大学
Course Objectives
• 课程目标 1 :理解计算机系统中面向对象的思维模式,具备利用面向对象的典型范式分解软件问题的能力;
• 课程目标 2 :掌握 UML 的语法及建模技术,能够运用 UML 理论解决实际问题;
• 课程目标 3 :对要开发的软件系统能够进行面向对象的分析与设计,熟练使用诸如 Rational Rose 、
Astah UML 等建模工具;
• 课程目标 4 :掌握职责分配设计模式,能够用职责分配思维解决软件设计问题;
• 课程目标 5 :了解面向对象分析与设计的前沿动态,了解国际国内流行的分析与设计方案。
Learning Materials
•Textbook:
• Applying UML and Patterns, An Introduction to Object-Oriented
Analysis and Design and Iterative Development, Craig Larman,
(第三版,影印版), 2006 ,中国电力出版社
•Reference:
• [1]. 《 UML 和》 3 版 , Craig Larman ,方梁译,机械工业出 版社, 2006
• [2]. 《 UML 应用
》,
程
过
践
实
模
建社 2003
版
出
业
工
械
机
滨
克
尤
• [3]. 《 Object-Oriented Analysis and Design with Applications 》,(第三版,影印
版), Grady Booch 等著,人民邮电出版社, 2008
• [4] 《》 杨芙清著 清华大学出版社 2013
About the Textbook
Aspects Description
1 design well The use of object technology is widespread, so mastery of OOA/D is critical for
you to succeed in the software world.
2 learn a process This book presents a well-defined iterative roadmap an agile approach to the
roadmap Unified Process so that you can move in a step-by-step process from
requirements to code.
3 learn UML for modeling The Unified Modeling Language(UML) has emerged as the standard notation for
modeling, so it's useful to be able to apply it skillfully.
4 learn design patterns Design patterns communicate the "best practice" idioms OO design experts
apply. You will learn to apply design patterns, including the popular "GoF"
patterns and the GRASP patterns.Learning and applying patterns will accelerate
your mastery of analysis and design.
5 learn from experience The structure and emphasis in this book are based on years of experience in
education and mentoring thousands of people in the art of OOA/D. It reflects that
experience by providing a refined, proven, and efficient approach to learn the
subject, so your investment in reading and learning is optimized.
How the Book Will Benefit You
Aspects Description
6 learn from a realistic It exhaustively examines two case studies to realistically illustrate the entire
study OOA/D process, and goes deeply into thorny details of the problem.
7 design to code,with It shows how to map object design artifacts to code in Java. It also introduces
TDD&refactoring test-driven development and refactor.
8 layered architecture It explains how to design a layered architecture and relate the UI layer to
domain and technical services layers.
9 design frameworks It shows you how to design an OO framework and applies this to the creation of
a framework for persistent storage in a database.
About the Author
• Craig larman serves as chief scientist for Valtech, an international consulting and skills
transfer company with divisions in Europe, Asia, and North America.
• He is also author of the best-selling software engineering and iterative, agile development
text Agile and Iterative Development: A Managers Guide.
• He travels worldwide, from Indiana to India, coaching development teams and Managers.
Since the mid 1980s, Craig has helped thousands of developers to apply OOA/D, skillful
modeling with the UML, and to adopt iterative development practices.
• After a failed career as a wandering street musician, he built systems in APL, PL/I, and CICS
in the 1970s. Starting in the early 1980s after a full recovery he became interested in artificial
intelligence(having little of his own) and built knowledge systems with Lisp machines, Lisp
Prolog, and smalltalk. He's also worked in organizations that build business systems in
Java , .NET, C++, and Smalltalk.
• He plays bad lead guitar in his very part-time band, the Changing Requirements(it used to
be called the Requirements, but some band members changed.)
• He holds a B.S. and M.S. in computer science from beautiful Simon Fraser University in
Vancouver, Canada.
About the Author
Syllabus
Time: 16:35 Pm Friday Classroom:3-205
Lecture Date Contents
Lecture 01(3) 9.13 Introduction to OODA
Lecture 02(4) 9.20 Iterative Process
Lecture 03(5) 9.27 Requirements Analysis
(6) 10.4 National Day holiday
Lecture 04(7) 10.11 Use Case Model
Lecture 06(8) 10.18 Lab Project (Requirement Analysis Lab )
Lecture 07(9) 10.25 Domain Model
Lecture 08(10) 11.1 Lab Project (Domain Model Lab )
Lecture 09(11) 11.8 SSD&Operation Contracts
Lecture 10(12) 11.15 Logical Architecture
Lecture 11(13) 11.22 Lab Project (Architecture Design )
Lecture 12(14) 11.29 Interaction Diagrams & Class Diagram
Lecture 13(15) 12.6 OOD with GRASP 1
• 实验要求:
• 以小组为单位开展项目建模实验;每组 5 人;
• 选择建模目标系统(可从下面的系统案例中选,也可以自行选题);
• 每个模块学习完成后,会要求大家在实验项目上完成相关建模活动;
• 实验课会请部分小组分享其建模结果,通过讨论发现模型中存在的问题并进一步完善。
• 以小组为单位提交实验建模作业,提供每个同学在实验作业中的贡献说明;
Project1
• 校园机动车管理系统
• 某高校有多个校区,分别为校区 1 、校区 2 和校区 3 ;
• 学校机动车管理分为三类,第一类是校内人员(教职工和学生),可为校内人员办理停车证,每次进出校园不再缴费;第二
类是校外人员,每次入校单独计费;第三类是学校公务车辆,无需缴费;
• 校内人员可办理的停车证有两类,一类是日停(通行证),停放时间为 6 : 00-24 : 00 ,每年 200 元,如果过
夜停车,每月最多停放 50 个小时;一类是夜停(通停证),可以全天停放,每年 1460 元;办理停车证的车辆可以进
入每个校区停放;
• 每个校内人员最多可以办理两辆车,需要通过网上申请,申请时提交相关材料,审核通过后,可进行缴费,缴费成功后可自
行打印停车证放在车内;如果名下有两辆车同时入校,则后进入校园的车辆按照校外车辆单独计费;
• 学校公务车辆的认定需要部门提出申请,审核通过后办理公务车停车证;
• 每个校门处设置自动车牌识别系统,车辆进入学校时自动记录入校时间;车辆出校时,需要按照停车规则计算是否需要缴费,
如果需要则完成缴费后方可出校;
• 高级功能可考虑违章停车管理、数据分析管理等功能;
• 更多规则可参考我校办理机动车的规则进行系统分析;
Project2
• 高校医院管理系统
• 某高校的校医院有多个科室,内科、外科、五官科、中医科、儿科、牙科等;每个科室有多名医生,医院可根据需求进行医
生出诊排班;
• 患者可根据需要挂某个科室的号,如果没有号了则无法挂号,如果挂号成功,则患者可收到一张挂号单,并前往相应科室就
诊;
• 医生按照挂号顺序叫号,问诊后输入患者诊断病历,如果需要可开检查单或药品;
• 患者进行支付,支付成功后可凭收费凭据和医生开具的单据前往药房取药或前往检查室检查;
• 如果患者进行了检查,可在检查结束后取得检查结果;
• 为了提高就诊效率,该高校提供了自助挂号、缴费、化验结果查询的设备;
Project3
• 火车票售票系统
• 用户可以在手机 APP 、 Web 网站、微信小程序、自助购票机、购票窗口等买火车票;
• 购票时需要选择起始站、终点站、购票日期,查询所有当日车次,系统显示当日还能够购票的车次信息;
• 用户可以选择车次,确定购票张数和类型(成人、学生、儿童等),选择乘车人信息(可提前维护到乘车人列表中)
• 系统按照本次列车座位布局显示座位号,并提示用户选择座位,用户选择座位后,可以支付票款;
• 支付成功后,系统订票完成,通过短信通知乘车人车票信息,用户可以查看已购车票;
• 用户乘车前如果需要报销凭证,可以在自助机通过身份证打印票据;
• 进站时,用户可以通过检票机验票或人脸识别设备扫脸等方式验证进站;
• 可以增加候补票、改签、退票等功能;
Project4
• 教学云平台系统
• 教学云平台是校内支持课程教学的一个系统,可以与校内其他系统对接数据,包括与教务管理系统对接排课信
息,与学生管理系统对接学生信息,与教师管理系统对接教师信息;
• 老师登录系统后,能够看到本学期自己教授的课程列表;
• 学生登录后,能够看到自己本学期课表中的课程列表;
• 学校教务管理人员可以查看全校的课程;学院教务管理人员可以查看
• 进入某个课程后,包括主页、作业、测验、论坛、问卷、学情等功能(具体可参考教学云平台),老师可以上
传课程资料,布置作业,发布调查问卷等功能;学生可以在线阅览、下载课程资料,提交作业,完成评测等功
能;
• 扩展功能:学生个性化学习子系统