L01 Introduction To OOAD (ch01)
L01 Introduction To OOAD (ch01)
& Design
面向对象的分析与设计
修佳鹏
xiujiapeng@bupt.edu.cn
计算机学院(国家示范性软件学院)
北京邮电大学
Part 1.Introduction
Objectives:
OOAD
Implementation
Java Programming
(Concrete)
(OOP,C++/C#/Java)
4
What Will You Learn? Is it Useful?
5
The Most Important Learning Goal
-what -how
-requirements -logical solution
-investigation of domain -understanding and
-understanding of problem description of solution
8
What is Object-Oriented Analysis and Design
• OOA identifies
• Concepts in the problem domain
• Relationships among those concepts
• Attributes of those concepts
10
OO Design
11
Object vs. Function Oriented Analysis
Library Info
System
System
Catalog Librarian
12
OOAD
Larman
13
Flight Information System Example
Domain Plane
visualization of
Concept:Plane,Flight, tailNumber domain concept
Pilot……
15
Define use cases
Primary Player
Actor
Description Player requests to roll the dice.
System Presents results:. If the dice
total is seven, player wins;
otherwise player loses.
16
Define a domain model
17
Define a domain model
18
Define Interaction Diagrams
22
Three Ways to Apply UML
• UML as sketch
– Informal and incomplete diagrams
• often hand sketched on whiteboards
– created to explore difficult parts of the problem or solution
space, exploiting the power of visual languages.
• UML as blueprint
– Relatively detailed design diagrams used either for
1. reverse engineering to visualize and better understanding
existing code in UML diagrams
2. code generation (forward engineering).
23
Three Ways to Apply UML
24
Agile Modeling and UML
30
UML Diagrams
Visual Modeling is a Good Thing
33
What is and isn’t Covered in the Case Studies?
minor focus
User Interface
explore how to connect to
other layers
primary focus
of case studies
application Sale Payment
logic layer explore how to
design objects
34
Case Study Strategy
Iteration 1
Iteration 2
Introduces just those
analysis and design Iteration 3
skills related to Additional analysis and
iteration one. design skills introduced.
Likewise.
35
Case One: The NextGen POS System
36
Case Two: The Monopoly Game System
• 大富翁游戏
• 买地
• 盖房子
• 银行存钱/投资股票
• 获得奖励/惩罚
• 收/交过路费
• 幸运卡/机会卡
• 进监狱
37
Homework