Lecture 7 OOAD – From Analysis to Design TDDC32

advertisement
Lecture 7
OOAD – From Analysis to Design
TDDC32
Lecture notes in Design and Implementation of a Software Module in Java 4 February 2013
Tommy Färnqvist, IDA, Linköping University
7.1
Lecture Topics
Contents
1
Use Cases
2
Modeling System Structure
2.1 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Class Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
6
11
3
Modeling System Behaviour
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Activity Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
19
21
1
1
7.2
Use Cases
7.3
1
7.4
7.5
2
7.6
7.7
3
7.8
7.9
4
7.10
7.11
5
7.12
7.13
2
2.1
Modeling System Structure
Classes
6
7.14
7.15
7
7.16
7.17
8
7.18
7.19
9
7.20
7.21
10
7.22
2.2
Class Diagrams
7.23
11
7.24
7.25
12
7.26
7.27
13
7.28
7.29
14
7.30
7.31
15
7.32
7.33
16
7.34
7.35
17
7.36
7.37
18
7.38
3
3.1
Modeling System Behaviour
Introduction
7.39
19
7.40
7.41
20
7.42
3.2
Activity Diagrams
7.43
21
7.44
7.45
22
7.46
7.47
23
7.48
7.49
24
7.50
7.51
25
7.52
7.53
26
7.54
7.55
27
7.56
7.57
28
7.58
Voluntary Homework Problem
Construct a class diagram from the following description:
• A Bank is composed by a number of Accounts.
• There are two types of accounts, CreditAccount, and SavingsAccount.
• Each Account is associated with one or two Persons. A person may however have as many accounts
as he/she wants to.
• An ATMmachine is associated with all existing accounts.
• A Person is associated with an account, but is dependent on an ATMmachine for cash withdrawals.
7.59
29
Download