14 - Models For Program Design
14 - Models For Program Design
SOICT
School of Information and Communication Technology
1
11/26/21
Heavyweight Approach
• Program design and coding are separated
• The design uses class models and other models to specify the program in
detail, before beginning the code
Lightweight Approach
• Program design and coding are intertwinned
• The development is iterative
Mixed Approach
• Outline design is created using models, with details worked out
iteratively during work
2
11/26/21
Program Design
UML Models
Models used for requirements
• Use case diagram shows a set of use cases and actors and their
relationships
Models used for system architecture:
• Component diagram shows the organization and dependencies among
a set of components
• Deployment diagram shows the configuration of processing nodes and
the components living on them
Models used for program design
• Class diagram shows a set of classes, interfaces, and collaborations
with their relationships
• Object Diagram or Sequence Diagram show a set of objects and their
relationships 6
3
11/26/21
Class Diagram
4
11/26/21
Notation: Relationships
10
10
5
11/26/21
11
11
Notation: Association
Employer Employee
12
12
6
11/26/21
Notation: Association
13
13
14
14
7
11/26/21
15
15
16
16
8
11/26/21
Noun Identification
17
17
Noun Identification
18
18
9
11/26/21
Candidate Classes
19
19
20
20
10
11/26/21
Methods
21
21
22
22
11
11/26/21
23
23
• Interaction diagrams
• Show set of objects and their relationships including messages that
may be dispatched among them
• Sequence diagram: time ordering of messages
24
24
12
11/26/21
Interaction
25
25
26
26
13
11/26/21
Actions on Objects
27
27
28
28
14
11/26/21
29
29
• Application classes:
• Customer
• Catalog
• Item/Product
• Order
• Purchased Item
• System classes:
• User Interface
• Purchase Interface
• Browse Interface
• Check Out
• Credit Card Authorization
• Item, Purchased Item
30
30
15
11/26/21
Class Diagram
31
31
Sequence Diagram
32
32
16
11/26/21
33
33
17