Chapter 5
Chapter 5
3 of 131
SOFTWARE DESIGN
4 of 131
SOFTWARE DESIGN
5 of 131
SOFTWARE DESIGN
6 of 131
UML DIAGRAMS
7 of 131
UML DIAGRAMS
8 of 131
UML DIAGRAMS
9 of 131
UML DIAGRAMS
10 of 131
UML DIAGRAMS
11 of 131
UML ACTIVITY DIAGRAM
12 of 131
UML ACTIVITY DIAGRAM
13 of 131
UML ACTIVITY DIAGRAM
14 of 131
UML ACTIVITY DIAGRAM
15 of 131
UML ACTIVITY DIAGRAM
16 of 131
UML ACTIVITY DIAGRAM
17 of 131
UML ACTIVITY DIAGRAM
18 of 131
UML ACTIVITY DIAGRAM
19 of 131
UML ACTIVITY DIAGRAM
20 of 131
UML ACTIVITY DIAGRAM
21 of 131
UML ACTIVITY DIAGRAM
22 of 131
UML ACTIVITY DIAGRAM
23 of 131
UML ACTIVITY DIAGRAM
24 of 131
UML ACTIVITY DIAGRAM
25 of 131
UML ACTIVITY DIAGRAM
26 of 131
UML ACTIVITY DIAGRAM
27 of 131
UML ACTIVITY DIAGRAM
28 of 131
UML ACTIVITY DIAGRAM
√ Example (Manual Activation of Trial Product): After using the trial product
for some time customer decides to activate product by requesting a
permanent, full product license. Order Manager will have to create a new
activation key for the product while the customer could create and deliver
C2V file ("computer fingerprint"). Once both the new product key and the
C2V file become available to the customer service, it could activate product,
generate V2C file and deliver it back to the customer. The customer applies
license received and thus activates installed trial product to become a full
product. The product could be protected from copying to other computers or
virtual machines by the HASP SL license and protection key.
− Three activity partitions are shown on the diagram as vertical swimlanes and
represent actors participating in the activity - Order Management, Customer
Service, and Customer.
29 of 131
UML ACTIVITY DIAGRAM
30 of 131
UML ACTIVITY DIAGRAM
31 of 131
UML ACTIVITY DIAGRAM
√ Example (Single Sign-On (SSO)): To interact with partner companies Google uses single sign-
on based on OASIS SAML 2.0 protocol. Google acts as service provider with services such as
Gmail or Start Pages. Partner companies act as identity providers and control user names,
passwords, and other information used to identify, authenticate and authorize users for web
applications that Google hosts. Each partner provides Google with the URL of its SSO service
as well as the public key that Google will use to verify SAML responses. When a user attempts
to use some hosted Google application, such as Gmail, Google generates a SAML
authentication request and sends redirect request back to the user's browser. Redirect points to
the specific identity provider. SAML authentication request contains the encoded URL of the
Google application that the user is trying to reach. The partner identity provider authenticates
the user by either asking for valid login credentials or by checking for its own valid
authentication cookies. The partner generates a SAML response and digitally signs it. The
response is forwarded to Google's Assertion Consumer Service (ACS). Google's ACS verifies
the SAML response using the partner's public key. If the response is valid and user identity was
confirmed by identity provider, ACS redirects the user to the destination URL. Otherwise user
will see error message.
32 of 131
UML ACTIVITY DIAGRAM
33 of 131
UML ACTIVITY DIAGRAM
34 of 131
UML SEQUENCE DIAGRAM
35 of 131
UML SEQUENCE DIAGRAM
36 of 131
UML SEQUENCE DIAGRAM
37 of 131
UML SEQUENCE DIAGRAM
38 of 131
UML SEQUENCE DIAGRAM
39 of 131
UML SEQUENCE DIAGRAM
40 of 131
UML SEQUENCE DIAGRAM
41 of 131
UML SEQUENCE DIAGRAM
42 of 131
UML SEQUENCE DIAGRAM
43 of 131
UML SEQUENCE DIAGRAM
44 of 131
UML SEQUENCE DIAGRAM
45 of 131
UML SEQUENCE DIAGRAM
46 of 131
UML SEQUENCE DIAGRAM
47 of 131
UML SEQUENCE DIAGRAM
48 of 131
UML SEQUENCE DIAGRAM
49 of 131
UML SEQUENCE DIAGRAM
50 of 131
UML SEQUENCE DIAGRAM
51 of 131
UML SEQUENCE DIAGRAM
52 of 131
UML SEQUENCE DIAGRAM
√ Example: Facebook (FB) user could be authenticated in a web application to allow access
to his/her FB resources. Instead of using the FB user credentials to access protected
resources, the web application obtains an access token. Web application should be
registered by FB to have an application ID (client_id) and secret (client_secret). When
request to some protected FB resources is received, web browser ("user agent") is
redirected to FB's authorization server with application ID and the URL the user should be
redirected back to after the authorization process. User receives back Request for
Permission form. If the user authorizes the application to get his/her data, FB authorization
server redirects back to the URI that was specified before together with authorization code
("verification string"). The authorization code can be exchanged by web application for an
OAuth access token. If web application obtains the access token for a FB user, it can
perform authorized requests on behalf of that FB user by including the access token in the
FB Graph API requests. If the user did not authorize web application, FB issues redirect
request to the URI specified before, and adds the error_reason parameter to notify the web
application that authorization request was denied.
53 of 131
UML SEQUENCE DIAGRAM
54 of 131
UML STATE MACHINE DIAGRAM
55 of 131
UML STATE MACHINE DIAGRAM
56 of 131
UML STATE MACHINE DIAGRAM
√ Water can exist in several states - liquid, vapor, solid, and plasma.
√ Several transitions are possible from one state to another.
− For example, freezing is phase change from liquid state to ice.
− Condensation is phase change from vapor state to liquid.
− Water vapor could turn directly into frost through deposition.
57 of 131
UML STATE MACHINE DIAGRAM
58 of 131
UML STATE MACHINE DIAGRAM
59 of 131
UML STATE MACHINE DIAGRAM
60 of 131
UML STATE MACHINE DIAGRAM
61 of 131
UML STATE MACHINE DIAGRAM
62 of 131
UML STATE MACHINE DIAGRAM
63 of 131
UML STATE MACHINE DIAGRAM
64 of 131
UML STATE MACHINE DIAGRAM
65 of 131
UML STATE MACHINE DIAGRAM
66 of 131
UML STATE MACHINE DIAGRAM
67 of 131
UML STATE MACHINE DIAGRAM
68 of 131
UML STATE MACHINE DIAGRAM
√ Example (Oven):
Consider the operations using oven to cook.
You set the power and time at first. Then, open the door,
put the tray inside and close the door.
69 of 131
UML STATE MACHINE DIAGRAM
70 of 131
UML STATE MACHINE DIAGRAM
√ Example (Heater/cooler):
− Idle state receives Too Hot event
− Idle state receives Too Cool event
− Cooling/Startup state receives Compressor Running event
− Cooling/Ready state receives Fan Running event
− Cooling/Running state receives OK event
− Cooling/Running state receives Failure event
− Failure state receives Failure Cleared event
− Heating state receives OK event
− Heating state receives Failure event
71 of 131
UML STATE MACHINE DIAGRAM
72 of 131
UML CLASS DIAGRAM
73 of 131
UML CLASS DIAGRAM
74 of 131
UML COMPONENT DIAGRAM
75 of 131
UML COMPONENT DIAGRAM
76 of 131
UML COMPONENT DIAGRAM
77 of 131
UML COMPONENT DIAGRAM
78 of 131
UML COMPONENT DIAGRAM
79 of 131
UML COMPONENT DIAGRAM
80 of 131
UML COMPONENT DIAGRAM
81 of 131
UML COMPONENT DIAGRAM
82 of 131
UML COMPONENT DIAGRAM
83 of 131
UML COMPONENT DIAGRAM
• Assembly connector
◊ a connector between two or more components on
components that defines that one or more components
provide the services that other components use.
• Delegation connector
◊ a connector that links the external contract of a component to
the realization of that behavior.
84 of 131
UML COMPONENT DIAGRAM
85 of 131
UML COMPONENT DIAGRAM
• Instance Level:
86 of 131
UML COMPONENT DIAGRAM
√ Example:
87 of 131
UML DEPLOYMENT DIAGRAM
88 of 131
UML DEPLOYMENT DIAGRAM
89 of 131
UML DEPLOYMENT DIAGRAM
90 of 131
UML DEPLOYMENT DIAGRAM
91 of 131
UML DEPLOYMENT DIAGRAM
92 of 131
UML DEPLOYMENT DIAGRAM
93 of 131
UML DEPLOYMENT DIAGRAM
94 of 131
UML DEPLOYMENT DIAGRAM
95 of 131
DATA FLOW DIAGRAM
96 of 131
DATA FLOW DIAGRAM
97 of 131
DATA FLOW DIAGRAM
98 of 131
DATA FLOW DIAGRAM
99 of 131
DATA FLOW DIAGRAM
100 of 131
DATA FLOW DIAGRAM
101 of 131
DATA FLOW DIAGRAM
102 of 131
DATA FLOW DIAGRAM
103 of 131
DATA FLOW DIAGRAM
104 of 131
DATA FLOW DIAGRAM
105 of 131
DATA FLOW DIAGRAM
106 of 131
DATA FLOW DIAGRAM
107 of 131
DATA FLOW DIAGRAM
108 of 131
DECISION TABLE
109 of 131
DECISION TABLE
110 of 131
DECISION TABLE
111 of 131
DECISION TABLE
112 of 131
DECISION TABLE
113 of 131
DECISION TABLE
114 of 131
DECISION TABLE
115 of 131
DECISION TABLE
116 of 131
DECISION TABLE
117 of 131
DECISION TABLE
118 of 131
DECISION TABLE
119 of 131
DECISION TABLE
120 of 131
DECISION TABLE
121 of 131
DECISION TABLE
122 of 131
DECISION TABLE
123 of 131
DECISION TABLE
124 of 131
DECISION TABLE
125 of 131
DECISION TABLE
Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12
C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2
C3
A1
A2
A3
A4
A5
126 of 131
DECISION TABLE
Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12
C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2 WD WD WE WE WD WD WE WE WD WD WE WE
C3
A1
A2
A3
A4
A5
127 of 131
DECISION TABLE
Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12
C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2 WD WD WE WE WD WD WE WE WD WD WE WE
C3 A A A A S S S S B B B B
A1
A2
A3
A4
A5
128 of 131
DECISION TABLE
Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12
C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2 WD WD WE WE WD WD WE WE WD WD WE WE
C3 A A A A S S S S B B B B
A1 X X X
A2 X X X
A3 X X X X X X
A4 X X
A5 X X
129 of 131
DECISION TABLE
C1 PE PE PE PE PE PE NP
C2 WD WE WD WE WD WE -
C3 A A S S H H -
A1 X X X
A2 X X X
A3 X
A4 X X
A5 X X
130 of 131
REFERENCES
√ The below resources are used to prepare some examples and figures given in these
slides:
− https://www.uml-diagrams.org/
− https://creately.com/blog/diagrams/uml-diagram-types-examples/
− https://www.guru99.com/software-development-life-cycle-tutorial.html
− http://ecomputernotes.com/software-engineering/write-a-note-on-software-design-phases
− https://www.geeksforgeeks.org/software-engineering-software-design-process/
− http://www.differencebetween.info/difference-between-uml-1-and-uml-2
− https://slideplayer.com/slide/14841300/
− https://medium.com/@warren2lynch/a-comprehensive-guide-to-14-types-of-uml-diagram-
affcc688377e
− https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-state-
machine-diagram/
− https://online.visual-paradigm.com/diagrams/tutorials/state-machine-diagram-tutorial/
131 of 131