Preview-9781000587265 A42846009

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

UML Diagramming: A Case

Study Approach
UML Diagramming
A Case Study Approach

Dr. Suriya Sundaramoorthy


First edition published 2022
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742

and by CRC Press


4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

© 2022 Taylor & Francis Group, LLC

CRC Press is an imprint of Taylor & Francis Group, LLC

Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and p ­ ublishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
­copyright ­holders if permission to publish in this form has not been obtained. If any copyright material has not been
­acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or
utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, ­including
­photocopying, microfilming, and recording, or in any information storage or retrieval system, without written
­permission from the publishers.

For permission to photocopy or use material electronically from this work, access www.copyright.com or contact the
Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are
not available on CCC please contact [email protected]

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for
identification and explanation without intent to infringe.

ISBN: 978-1-032-26129-4 (hbk)


ISBN: 978-1-032-12078-2 (pbk)
ISBN: 978-1-003-28712-4 (ebk)

DOI: 10.1201/9781003287124

Typeset in Garamond
by codeMantra
In the loving memory of my paternal grandfather Mr. S. Shanmugavelayutham (Telecom
Employee), who taught me how much important is to educate a girl child in a family.
In the loving memory of my late maternal grandmother Mrs. A. Shenbagalakshmi
(School Teacher) and late paternal grandmother Mrs. S. Sethulakshmi (Home Maker),
who both taught me that the life of a working mother is actually a life of a warrior.
To my father, Mr. S. Sundaramoorthy (Postal Employee), who always have
faith, love and hope on me with a strong belief that he has given enough
education to his daughter to make a better tomorrow for herself.
To my mother, Mrs. R. J. Shanthi (BSNL Employee), who
motivated me always to break all my hurdles.
To my loving daughters Shriya and Sana Dheepthi.
To my well-wishers and Gurus: Dr. V. C. S. Immanuel,
Dr. S. P. Shantharajah and Mr. Ganesh Natrajan
To all my dear students who make me learn every time especially the batches
of 2015–2019, 2016–2020, 2017–2021 and 2018–2022 of PSG College of
Technology, Coimbatore, India who assisted me in this regard.
Finally, I would like to thank the great Almighty for blessing me
with all these wonderful superheroes around me.
Contents

Preface .......................................................................................................................................xi
Author ..................................................................................................................................... xiii
1 Introduction to UML Diagrams and Its Components .................................................1
1.1 UP Phases................................................................................................................ 1
1.1.1 UML........................................................................................................... 2
1.1.2 UML Usecase Diagram .............................................................................. 4
1.1.2.1 Usecase Template ......................................................................... 6
1.1.3 UML Activity Diagram .............................................................................. 6
1.1.4 UML Sequence Diagram ...........................................................................10
1.1.5 UML Collaboration Diagram ....................................................................13
1.1.6 UML State Chart Diagram ........................................................................14
1.1.7 UML Class Diagram .................................................................................17
1.1.8 UML Component Diagram ...................................................................... 20
1.1.9 UML Deployment Diagram ......................................................................21
2 Design of UML Diagrams for Webmed – Healthcare Service System Services ..........23
2.1 Problem Statement ................................................................................................ 23
2.2 Major Functionalities and Its Description ............................................................. 24
2.3 Data-Flow Diagrams ..............................................................................................25
2.4 Proposed Design – UML Diagrams ...................................................................... 27
2.4.1 Usecase Specification for the UML Usecase Diagram Generated
Using Star UML Tool ............................................................................... 27
3 Design of UML Diagrams for Inventory Management System ..................................39
3.1 Problem Statement ................................................................................................ 39
3.2 Software Requirements Specification ..................................................................... 39
3.3 Functional Requirements....................................................................................... 40
3.4 Design and Design Constraints ............................................................................. 40
3.5 UML Diagrams ..................................................................................................... 46
3.6 Code Generated..................................................................................................... 54
3.6.1 Inventree.java ............................................................................................ 54
3.6.2 AddGoods.java ...........................................................................................55
3.6.3 Screenshots of the Project.......................................................................... 56
4 Design of UML Diagrams for Business Process Outsourcing (BPO)
Management System ...................................................................................................59
4.1 Problem Statement .................................................................................................59

vii
viii ◾ Contents

4.2 Functional Requirements........................................................................................59


4.3 Design and Design Constraints ............................................................................. 60
5 Design of UML Diagrams for E-Ticketing for Buses .................................................75
5.1 Problem Statement ................................................................................................ 75
5.2 UML Diagrams ......................................................................................................76
6 Design of UML Diagrams for Weather Monitoring System ......................................85
6.1 Problem Statement .................................................................................................85
6.2 Data Flow Diagrams ..............................................................................................85
6.3 UML Diagrams ..................................................................................................... 87
7 Design of UML Diagrams for E-Province ..................................................................95
7.1 Problem Statement ................................................................................................ 95
7.2 UML Diagrams ....................................................................................................102
8 Design of UML Diagrams for DigiDocLocker ........................................................105
8.1 Problem Statement ...............................................................................................105
8.2 UML Diagrams ....................................................................................................106
9 Design of UML Diagrams for Online Marketplace .................................................113
9.1 Problem Statement ...............................................................................................113
9.2 UML Diagrams ....................................................................................................114
10 Design of UML Diagrams for Product Recommendation System ...........................123
10.1 Problem Statement .............................................................................................. 123
10.2 UML Diagrams ................................................................................................... 123
11 Design of UML Diagrams for Advocate Diary.........................................................129
11.1 Problem Statement ...............................................................................................129
11.2 UML Diagrams ....................................................................................................129
12 Design of UML Diagrams for My Helper ................................................................139
12.1 Problem Statement ...............................................................................................139
12.2 UML Diagrams ....................................................................................................141
13 Design of UML Diagrams for COVID-19 Management System ..............................147
13.1 Problem Statement ...............................................................................................147
13.2 UML Diagrams ....................................................................................................149
14 Design of UML Diagrams for Car Care ...................................................................157
14.1 Problem Statement ...............................................................................................157
14.2 UML Diagrams ....................................................................................................158
15 Design of UML Diagrams for E-Ration Shop ..........................................................167
15.1 Problem Statement ...............................................................................................167
15.2 UML Diagrams ....................................................................................................168
16 Design of UML Diagrams for Textile Management System.....................................177
16.1 Problem Statement ...............................................................................................177
16.2 UML Diagrams ....................................................................................................177
Contents ◾ ix

17 Design of UML Diagrams for National Health ID 2020 .........................................185


17.1 Problem Statement ...............................................................................................185
17.2 UML Diagrams ....................................................................................................185
18 Design of UML Diagrams for Device Handout System ...........................................191
18.1 Problem Statement ...............................................................................................191
18.2 UML Diagrams ....................................................................................................191
19 Design of UML Diagrams for Online College Magazine System.............................199
19.1 Problem Statement ...............................................................................................199
19.2 UML Diagrams ................................................................................................... 204
20 Design of UML Diagrams for Crime Bureau ...........................................................209
20.1 Problem Statement .............................................................................................. 209
20.2 UML Diagrams ................................................................................................... 209
21 Design of UML Diagrams for Smart Traffic Management System ..........................219
21.1 Problem Statement ...............................................................................................219
21.2 UML Diagrams ....................................................................................................219
22 Design of UML Diagrams for Job Seeker Portal System..........................................227
22.1 Problem Statement .............................................................................................. 227
22.2 UML Diagrams ................................................................................................... 227
23 Design of UML Diagrams for AAROGYA SETU – Health Care APP .....................237
23.1 Problem Statement .............................................................................................. 237
23.2 UML Diagrams ................................................................................................... 238
24 Design of UML Diagrams for Online Pharmacy Management System ...................247
24.1 Problem Statement ...............................................................................................247
24.2 UML Diagrams ....................................................................................................247
25 Design of UML Diagrams for EQUIHEALTH ........................................................265
25.1 Problem Statement ...............................................................................................265
25.2 System Architecture ...........................................................................................267
25.3 UML Diagrams ................................................................................................... 268
26 Design of UML Diagrams for an OTT-Based System – MINI REEL ......................279
26.1 Problem Statement .............................................................................................. 279
26.2 UML Diagrams ................................................................................................... 280
27 Design of UML Diagrams for e-Med Medical Assistance Tool ................................287
27.1 Problem Statement .............................................................................................. 287
27.2 UML Diagrams ................................................................................................... 287
28 Design of UML Diagrams for Diet Care ..................................................................295
28.1 Problem Statement .............................................................................................. 295
28.2 UML Diagrams ................................................................................................... 295
x ◾ Contents

29 Design of UML Diagrams for Student Counselling Management System...............303


29.1 Problem Statement .............................................................................................. 303
29.2 UML Diagrams ................................................................................................... 303
30 Design of UML Diagrams for E-Visa Processing and Follow-Up System ................313
30.1 Problem Statement ...............................................................................................313
30.2 UML Diagrams ....................................................................................................319
31 Design of UML Diagrams for Placement Automation System .................................325
31.1 Problem Statement ...............................................................................................325
31.2 UML Diagrams ................................................................................................... 326
32 Design of UML Diagrams for Farm Management System .......................................333
32.1 Problem Statement ...............................................................................................333
32.2 UML Diagrams ....................................................................................................333
33 Design of UML Diagrams for Green Rides ..............................................................341
33.1 Problem Statement .............................................................................................. 341
33.2 UML Diagrams ................................................................................................... 342
34 Design of UML Diagrams for Art Gallery Management System .............................349
34.1 Problem Statement .............................................................................................. 349
34.2 UML Diagrams ................................................................................................... 349
35 Design of UML Diagrams for GUIDE – Dropshipping Website .............................357
35.1 Problem Statement ...............................................................................................357
35.2 UML Diagrams ....................................................................................................357
36 Design of UML Diagrams for Online Quiz System .................................................367
36.1 Problem Statement ...............................................................................................367
36.2 UML Diagrams ....................................................................................................367
37 Design of UML Diagrams for Book Bank Management System .............................377
37.1 Problem Statement .............................................................................................. 377
37.2 Literature Review .................................................................................................378
37.3 UML Diagrams ....................................................................................................378
38 Design of UML Diagrams for Website Development ...............................................389
38.1 Problem Statement .............................................................................................. 389
38.2 UML Diagrams ................................................................................................... 389
39 Design of UML Diagrams for STARTUP MEET ....................................................397
39.1 Problem Statement .............................................................................................. 397
39.2 UML Diagrams ................................................................................................... 397
40 Design of UML Diagrams for Video Suggestion System..........................................405
40.1 Problem Statement .............................................................................................. 405
40.2 UML Diagrams ................................................................................................... 405

Index .................................................................................................................................415
Preface

UML Diagramming: A Case Study Approach is the outcome of efforts of bringing out the role of
UML Diagrams in exposing the needs of any innovative idea. It covers 40 chapters focusing on
development of UML diagrams to expose the requirements for better understanding of underlying
systems. The various case studies taken for discussion are WEBMED – Healthcare Service System
Services, Inventory Management System, Business Process Outsourcing (BPO) Management
System, E-Ticketing for Buses, Weather Monitoring System, E-Province, DigiDocLocker, Online
Marketplace, Product Recommendation System, Advocate Diary, My Helper, COVID-19
Management System, Car Care, E-Rationshop, Textile Management System, National Health ID
2020, Device Handout System Online College Magazine System, Crime Bureau, Smart Traffic
Management System, Job Seeker Portal System, AAROGYA SETU – Health Care APP, Online
Pharmacy Management System, EQUIHEALTH, an OTT-based System – MINI REEL, E-Med
Medical Assistance Tool, Diet Care, Student Counselling Management System, Video Suggestion
System, E-Visa Processing and Follow-Up System, Placement Automation System, Farm
Management System, Green Rides, Art Gallery Management System, GUIDE – Dropshipping
Website, Online Quiz System, Book Bank Management System, Website Development,
START-UP MEET and Video Suggestion System.

xi
Author

Dr. Suriya Sundaramoorthy has completed her B.E. degree in


the field of Computer Science and Engineering securing the 31st
rank among all self-financing Engineering colleges under Anna
University in 2004. She is a GATE scorer in GATE 2007. She is
a gold medallist at ME CSE from PSG College of Technology,
Coimbatore under Anna University in 2008. She was awarded
with the BEST PROJECT AWARD for ME CSE stream. She
was awarded with the BEST ALL ROUNDER of that batch.
Later, she completed doctorate in the field of Information
and Communication Engineering under Anna University in
2015. Currently, she is guiding Ph.D. scholars under Anna
University. She has 10 years of experience in teaching. She has
more than 50 journal and conference publications in the field
of Grid Scheduling, Data Mining, Cloud Computing, Artificial
Intelligence and Computational Intelligence. She has nearly 10 book chapter publications in CRC
Press, Springer and Elsevier.

xiii
Chapter 1

Introduction to UML
Diagrams and Its Components

1.1 UP Phases
An approach that helps a user to build, deploy and maintain a software is termed as Software
Development Process. Such a Software Development Process which is required to build an Object
Oriented System is called as ‘Unified Process’. Craig Larman states Unified Process as ‘The Unified
Process (UP) combines commonly accepted best practices, such as an iterative lifecycle and risk-
driven development, into a cohesive and well-documented description/process’. There are four phases
of the Unified Process, namely Inception, Elaboration, Construction and Transition. The inception
phase takes a problem statement from a client as input. It traces answers for the below seven ques-
tions to generate a report to decide about the feasibility of developing the software (Figure 1.1).
The elaboration phase takes the report generated by the inception phase as input to perform
its processing. It involves three main activities like developing a core architecture for the given
system, developing a project schedule and finally sketching a Unified Modeling Language (UML)
Usecase diagram (Figure 1.2).
The construction phase involves a set of three activities, namely, coding, testing and feedback.
Notable point is that the construction phase involves Alpha testing, i.e. testing a software at the
developer site (Figure 1.3).

Figure 1.1 Inception phase.

DOI: 10.1201/9781003287124-1 1
2 ◾ UML Diagramming

Figure 1.2 Elaboration phase.

Figure 1.3 Construction phase.

Figure 1.4 Transition phase.

The transition phase involves Beta testing, i.e. testing a software at the client site without the
support of developers, followed by deployment, and finally, fine tuning is done based on feedback
from the client’s side (Figure 1.4).

1.1.1 UML
It is a standard diagrammatic tool for designing. It is a graphical language for specifying, visual-
izing, constructing and documenting the artefacts of software systems. It helps in better under-
standing of the software or system or product to be developed among developers and customers.
UML diagrams include major important diagrams like UML Usecase Diagram, UML Activity
Diagram, UML Class Diagram, UML Sequence Diagram, UML Collaboration Diagram or UML
Communication Diagram, UML State Machine Diagram, UML Component Diagram and UML
Deployment Diagram (Figure 1.5 and Table 1.1).
UML Diagrams and Its Components ◾ 3

Figure 1.5 Pyramid of UML diagrams.

Table 1.1 List of UML Diagrams


S.
No UML Diagram Purpose of the UML Diagram

1 UML Usecase It focuses on the identification of functional requirements


Diagram of the system under consideration.

2 UML Activity Diagram It focuses on sequential and parallel activities involved in


each functional requirement of the system.

3 UML Class Diagram It describes the structure of the system in terms of classes
and objects.

4 UML Sequence It depicts the objects involved in the scenario and the
Diagram sequence of messages exchanged between the objects
needed to carry out the functionality.

5 UML Collaboration It shows interactions between objects using sequenced


Diagram or UML messages in a free-form arrangement.
Communication
Diagram

6 UML State Machine It describes the life of an object using three main elements:
Diagram states of an object, transitions between states and events
that trigger the transitions.

(Continued)
4 ◾ UML Diagramming

Table 1.1 (Continued) List of UML Diagrams


S.
No UML Diagram Purpose of the UML Diagram

7 UML Component The purpose of a component diagram is to show the


Diagram relationship between different components in a system.

8 UML Deployment Deployment diagrams are used for describing the hardware
Diagram components, where software components are deployed.
The purpose of deployment diagrams can be described as:
• Visualize the hardware topology of a system.
• Describe the hardware components used to deploy
software components.
• Describe the runtime processing nodes.

1.1.2 UML Usecase Diagram


Table 1.2 contains the details of components of the UML Usecase Diagram.
Table 1.3 contains the various usecase relationships.

Table 1.2 Components of UML Usecase Diagram


S. Name of the UML
No Component Notation Purpose

1 System • It represents the scope of the system.


Boundary • It encapsulates the complete set of functionalities of
the system.

2 Actors • The users that interact with a system.


• An actor can be a person, an organization or an
outside system that interacts with your application or
system.
• An actor in a usecase diagram interacts with a
usecase.
• It is up to the developer to consider what actors
make an impact on the functionality that they want
to model.
3 Usecases • A usecase is a visual representation of a distinct
business functionality in a system.
• It ensures that the business process is discrete in
nature.
• List the discrete business functions in given problem
statement.
• Identifying usecases is a discovery.
UML Diagrams and Its Components ◾ 5

Table 1.3 Usecase Relationships


S. Usecase
No Relationship UML Notation and Its Functionality

1 Association

• Association represents the relationship between an actor and a


usecase.

2 Directed
Association

• Directed Association represents the one-way relationship where


an actor takes the responsibility of in fluencing a usecase.

3 Include

• Include relationship represents the situation where one usecase


includes the functionality of one other usecase.

4 Extend

• Extend relationship between any two usecases implies a


meaningful relationship that the extended usecase adds up
additional behaviour towards the existing functionality of the
base usecase.

(Continued)
6 ◾ UML Diagramming

Table 1.3 (Continued) Usecase Relationships


S. Usecase
No Relationship UML Notation and Its Functionality

5 Generalization

• Generalization is the relationship between a parent usecase and


one or more child usecases.

6 Dependency

• Dependency defines the relationship in which the existence of


one usecase is dependent on the existence of another usecase.

1.1.2.1 Usecase Template
Every usecase is explained in detail through a standard template called as usecase template.

Usecase ID – represents a unique ID for a usecase.

Usecase Name – represents a meaningful name of the usecase.

Actors Involved – actors interacting with the usecase.

Description – the brief explanation of the functionality of the usecase.

Preconditions – state of the system before executing this functionality of the usecase.

Main Flow – description of how the functionality is implemented.

Post Conditions – state of the system after executing this functionality of the usecase.

Alternate Flow – other possibilities available.

1.1.3 UML Activity Diagram


Table 1.4 contains the details of components of the UML Activity Diagram.
UML Diagrams and Its Components ◾ 7

Table 1.4 Components of UML Activity Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Initial state

• It represents the start state of the system under


consideration.

2 Final state

• It represents the termination state of the system under


consideration.

3 Swimlanes • A swimlane contains two partitions namely a top partition


representing entities like an actor/a usecase/a class, etc.
and the second partition focuses on the set of activities
involved.
• Swimlane is of two types namely vertical swimlane and
horizontal swimlane.
• Vertical swimlane – represents parallel activities of a
particular scenario of the system under consideration.

• Horizontal swimlane – represents sequential activities of a


particular scenario of the system under consideration.
4 Action state • An action state represents an operation or a business
activity or a process.

(Continued)
8 ◾ UML Diagramming

Table 1.4 (Continued) Components of UML Activity Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

5 Object • An entity that carries data between any two action states.

6 Synchronization • Synchronization represents two or more activities


happening at same time or rate.
• It is of two types namely: Fork – divides a single activity
flow into two or more concurrent activities and Join
– combines two or more concurrent activities into a single
flow by ensuring that only one of the activities at a time.

7 Decision • A decision node has one input or two or more outputs


depending on the condition for which it is designed.
• Each output flow has a condition attached to it.
• If a condition is met, the flow proceeds along with the
appropriate output.
• An ‘else’ output can be defined along which the flow can
proceed if no other condition is met.

(Continued)
UML Diagrams and Its Components ◾ 9

Table 1.4 (Continued) Components of UML Activity Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

8 Merge • The purpose is to merge the input flows.


• The inputs are not synchronized; if a flow reaches such a
node it proceeds at the output without waiting for the
arrival of other flows.

9 Flow Final • It represents abnormal termination of a path in an activity


diagram that is not considered as a part of the system
under development.

10 Transition • Transition are arrows that represent a movement from the


source activity state to the target activity state which gets
triggered by the completion of the activity of the source
activity state.

11 Self-Transition • It represents the internal transition to an actions state itself.

12 Signal Send State • Signals represent how activities can be influenced


externally by the system.
• They usually appear in pairs of sent and received signals.
• Signal Send State represents sending signal action outside
of the activity.
• The signal sends state does not wait for any responses from
the receiver of the signal.
• It ends itself and passes the execution control to the next
action.
• A Signal Send State takes its notation as a convex pentagon.

(Continued)
10 ◾ UML Diagramming

Table 1.4 (Continued) Components of UML Activity Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

13 Signal Accept State • An action state whose trigger is a signal event is informally
called Signal Accept State.
• It corresponds to Signal Send State.
• Signal Accept State with incoming edges means that the
action starts after the previous action state completes.
• Signal Accept State with no incoming edges remains
enabled after it accepts an event.
• It does not terminate after accepting an event and
outputting a value, but continues to wait for other events.

14 Subactivity • A subactivity is an action state that can become as another


main activity scenario in future.

1.1.4 UML Sequence Diagram


Table 1.5 contains the details of components of the UML Sequence Diagram.

Table 1.5 Components of UML Sequence Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Object • It represents an entity of the system that gets involved in


interaction with other entities of the system via messages.
• An object has three related information namely object name,
lifeline and focus of control.
• The standard syntax of naming an object is Object_name:
Class_name.
• Lifeline represents the complete existence of a particular object
involved in a scenario.
• Focus of control represents the active session of the object.

(Continued)
UML Diagrams and Its Components ◾ 11

Table 1.5 (Continued) Components of UML Sequence Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

2 Message & its • The communication between objects of any scenario is done
types through the concept of message passing with the help of
transition component.
• Messages are numbered over the transition arrows.
• Syntax of message is Message_no: Message()
• There are five types of messages applicable to any transition
between any two objects in a sequence diagram.
2.1 Synchronous • The messages sent from the sender are based on wait semantics.
Message • Wait semantics is a situation where the sender needs an
acknowledgement of each message sent from the receiver
before transmitting the next successive message.
• The notation of a synchronous message is a solid line with a
shaded arrow head.

2.2 Return • It represents a reply message for a synchronous message.


Message

2.3 Asynchronous • These type of messages are sent by the sender to the receiver
Message which does not require an acknowledgement from the receiver.
• This feature enables the sender to send any number of messages
to the receiver.

(Continued)
12 ◾ UML Diagramming

Table 1.5 (Continued) Components of UML Sequence Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

2.4 Create • Create message represents the instantiation of objects in a


Message scenario.
• It includes the stereotype called <<create>>.

2.5 Destroy • Destroy message represents the destruction of the lifecycle of an


Message object in a scenario.
• It includes the stereotype called <<destroy>>.
• Destruction is pictorially represented by a large X pointing at the
end of the lifeline of an object.

3 Fragments • Fragments represent a set of conditional messages or looping


messages in a scenario.
• The most vital fragments are opt, alt, loop.
• Each fragment is represented as a rectangular box encapsulating
those set of messages with a label in the top left corner
representing the fragment type.
3.1 Opt • This fragment represents a simple IF scenario.
• Messages get executed only if the condition defined in the opt
fragment remains true.
• In case of condition does not get satisfied, the control jumps out
of the fragment.
• Conditions are technically called as Guard.

(Continued)
UML Diagrams and Its Components ◾ 13

Table 1.5 (Continued) Components of UML Sequence Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

3.2 Alt • This fragment represents IF ELSE scenario.


• This fragment has two partitions inside the rectangular area.
• Messages in the first compartment get executed only if the
condition defined in the first partition of the alt fragment
remains true.
• Otherwise, the messages in the second partition of the alt
fragment get executed.

3.3 Loop • This fragment represents those set of messages that gets
executed repeatedly until the condition defined in the loop
fragment remains true.
• This fragment has two partitions inside the rectangular area.
• Messages in the first compartment get executed only if the
condition defined in the first partition of the alt fragment
remains true.

4 Nesting of • Depending on the demand of multiple conditions to get verified


fragments or repeated execution of the set of nested conditions, this
concept of nesting can be applied to different types of
fragments.

1.1.5 UML Collaboration Diagram


Majority of the components are common between UML Sequence Diagram and UML
Collaboration Diagram. Table 1.6 contains the details of the unique components of the UML
Collaboration Diagram.
14 ◾ UML Diagramming

Table 1.6 Unique Components of UML Collaboration Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Object • It represents an entity of the system that gets involved in


interaction with other entities of the system via messages.
• In the case of UML Collaboration diagrams, an object does not
have any lifeline or focus of control.

2 Link • Link enables the communication between any two objects.


• It is represented as a solid line without any arrow heads, so that
it represents bidirectional communication.
• Any number of bidirectional messages between two objects can
be communicated via a same link.

3 Self Link • A self-link connects an object to itself.

4 Forward • It represents messages from sender (first object) to receiver


stimulus (second object).
• It can of any of the five types of messages as discussed in UML
Sequence Diagram like Synchronous messages, Return
messages, Asynchronous messages, Create messages and
Destroy messages.

5 Reverse • It represents response messages from the receiver


stimulus (second object) to sender (first object).
• It can of any of the five types of messages as discussed in UML
Sequence Diagram like Synchronous messages, Return
messages, Asynchronous messages, Create messages and
Destroy messages.

1.1.6 UML State Chart Diagram


Table 1.7 contains the details of components of the UML State Machine Diagram.
UML Diagrams and Its Components ◾ 15

Table 1.7 Components of UML State Machine Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Initial State • It represents the start state of a system under consideration.

2 Final State • It represents the end state of a system under consideration.

3 Flow final • It represents abnormal termination of a path in a state machine


diagram which is not considered as a part of the system under
development.

4 State • It represents the state of the object in the system under


consideration.
• It is described using the following attributes namely:
i. Name – Name of the object.
ii. Entry – Action to be done before to enter the system.
iii. Do – Action to be done in that state.
iv. Exit – Action to be required to exit the system.

5 Transition • Transition are arrows that represent a movement from one state to
the other state which gets triggered by the completion of the
activity of the source state.

6 Self- • It represents internal transition to a state itself.


Transition

7 Junction • The purpose is to merge the input flows from different states
Point • The inputs are not synchronized; if a flow reaches such a state it
proceeds at the output without waiting for the arrival of other
flows from other states.
(Continued)
16 ◾ UML Diagramming

Table 1.7 (Continued) Components of UML State Machine Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

8 Choice Point • A Choice point has one input or two or more outputs depending
on the condition for which it is designed.
• Each output flow has a condition attached to it.
If a condition is met, the flow proceeds along with the appropriate
output.

9 Shallow • Shallow history of a state is a reference to the most recently visited


History state on the same hierarchy level.

10 Deep • Deep history of a state is a reference to the most recently visited


History simple state.

11 Submachine • A submachine is a state that can become as another main state


state chart diagram scenario in future.
UML Diagrams and Its Components ◾ 17

1.1.7 UML Class Diagram


Table 1.8 contains the details of components of the UML Class Diagram.

Table 1.8 Components of UML Class Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Class • Each class has three compartments namely:


i. Top compartment represents the name of class,
ii. Middle compartment represents structure of the class
(attributes) and
iii. Bottom compartment represents behaviour of the class
(operations)

• Attribute represents properties that describe the state of the


object.
• Syntax: Visibility Attribute_Name : Data_Type
• Examples of data types are: Int, Char, Float, String, Date, Time,
Money, Dollars, Colour, City, Country, Postal Code, Address,
Boolean, etc.

• Derived attributes are those attributes that are calculated or


derived from other attributes denoted by placing slash (/) before
name.
• Syntax:/Visibility Attribute_Name: Data_Type
• Operations represents the actions or functions that a class can
perform.
• Syntax: Visibility Operation_Name (Input Arg): Data_Type
• Input arguments take the syntax of an attribute.
• Methods that don’t return a value (i.e. void methods) should give
a return type of void.
2 Class • There are seven types of class relationship namely association,
Relationships directed association, dependency, aggregation, composition,
generalization, realization.
2.1 Association • When two classes communicate with each other, an association
is used to connect those two classes.

(Continued)
18 ◾ UML Diagramming

Table 1.8 (Continued) Components of UML Class Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

2.2 Directed • When two classes get connected in such way by giving priority to
Association one-way communication, they are connected by directed
association.

2.3 Dependency • When the existence of one class is dependent on the existence
of another class, then they are connected using dependency.

2.4 Aggregation • It represents a ‘part of’ relationship.


• Many instances of Class1 can be associated with Class2.
• Aggregation implies a relationship where the child class can exist
independently of the parent class.

2.5 Composition • It represents a ‘whole’ relationship.


• Composition implies a relationship where the child class cannot
exist independent of the parent class.

2.6 Generalization • Generalization represents the concept of inheritance.


• It represents the relationship between parent class and its child
classes.

(Continued)
UML Diagrams and Its Components ◾ 19

Table 1.8 (Continued) Components of UML Class Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

2.7 Interface & • Interfaces can be of two types namely required interfaces and
role of provider interfaces.
Realization • Provider interface describes the functionality offered by a class.
• Required interfaces describe the functionality needed by
another class.
• Provided interface is the interface implemented by a class, i.e a
class implements an interface.
• The required interface would be any use of an interface by a
component, i.e if a class defines a method that has the interface
as a parameter.

3 Association • An association class is an association that is also a class.


Class • It not only connects a set of classifiers but also defines a set of
features that belong to the relationship itself and not any of the
classifiers.
20 ◾ UML Diagramming

1.1.8 UML Component Diagram


Table 1.9 contains the details of components of the UML Component Diagram.

Table 1.9 Components of UML Component Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Component • It is a modular part of a system that encapsulates its contents.


• They are the logical elements of a system that plays an essential
role during the execution of a system.
• A component is a replaceable and executable piece of a system.

2 Interface • There are two types of component interfaces, namely provider


interface and required interface.
• Provider interface describes the functionality offered by a
component.
• Required interfaces describe the functionality needed by another
component.

3 Port • A port enables better communication between an interface and a


component.

4 Artifact • Scripting files like PHP, database files, configuration files, rar files,
executable files.

5 Association • It represents the two-way communication between any two


components involved in a relationship.
UML Diagrams and Its Components ◾ 21

1.1.9 UML Deployment Diagram


Table 1.10 contains the details of components of the UML Deployment Diagram.

Table 1.10 Components of UML Deployment Diagram


S. Name of the
No Component UML Notation and the Purpose of the Component

1 Node • Any computational resource with memory and processing


capability.
• There are two types of nodes namely Device node and Execution
Environment Node.
• A Device node represents a hardware device like Application
server, workstations, mobile device, embedded device, etc.
• An Execution Environment node represents a software or a
program like Operating system, workflow engine, browser,
Container, web server, database system, etc.

2 Artifact • Scripting files like PHP, database files, configuration files, rar files,
executable files.

3 Port • Port enables the communication between a device node and an


execution environment node.
• It also enables the communication between a node and an external
environment.

(Continued)
22 ◾ UML Diagramming

Table 1.10 (Continued) Components of UML Deployment Diagram

S. Name of the
No Component UML Notation and the Purpose of the Component

4 Association • It represents the two-way communication between any two nodes


involved in a relationship.

5 Directed • It represents the one-way communication between any two nodes


Association involved in a relationship.

6 Dependency • It represents how an existence of a node is dependent on another


node involved in a relationship.
Chapter 2

Design of UML Diagrams


for Webmed – Healthcare
Service System Services

2.1 Problem Statement
Healthcare service has huge demand these days as it really helps in managing a hospital or a medi-
cal office. The scope of healthcare service systems is increasing by each day and it is true for the
entire world. Some of these solutions include improved awareness about healthcare services and
health policies. The objective of this system is to provide medical assistance to people instantly
with the help of technology. This system eradicates the cultural sensitivity that prevails in many
hospitals and improvises the quality of medical assistance. The captivating features of this system
are online doctors, medicines at doorstep and bulletin of awareness. The users can also navigate
and choose among various insurance schemes that are displayed.
The primary objectives of Webmed healthcare system are to enable all citizens to receive
healthcare services whenever needed, and to deliver health services that are cost-effective and
meet pre-established standards of quality. The main functions of this system deal with finance,
health A–Z, resources, drugs and supplements, news and experts, payment and feedback.
Register function allows the patients or the caregivers to register on the website. Login func-
tion allows the patients to access the website. Financing focuses on the purchase of insurance.
Health A–Z displays all the diseases along with their symptoms. Resources function consists
of the sub-functions including symptoms checker, health calculator, find a doctor based on the
geographical location of the patient, insurance guide and ambulance providence. Drugs and
supplements include online medicine delivery, where people could shop for medicines online.
News and experts function is to provide health awareness and threats that are prevailing. This
function also gives information regarding counselling programs and blood donation camps. The
payment function is to reimburse providers for services delivered. The feedback function collects
user reviews for the website.

DOI: 10.1201/9781003287124-2 23
24 ◾ UML Diagramming

2.2 Major Functionalities and Its Description


The major functionalities of this system along with their description are as follows:
Register – this functionality acts as a membership functionality that allows the users, patients
or caregivers to register into this website to access all the resources. Login – this functionality
authenticates the user to provide access permissions. Facilities – this functionality allows us to
access all the options available on the website. Logout – this functionality ends the access to the
website. Finance – this functionality allows to purchase insurance, or to pay for healthcare ser-
vices consumed. Health A–Z – this functionality provides details of all the diseases. Resources –
this functionality has sub-functions, namely symptoms checker, health calculator, find a doctor,
insurance guide and ambulance providence. Drugs and supplements – this functionality pro-
vides online delivery of medicines. This functionality takes the doctor’s statement for the issue
of medicine and the patient’s willingness to buy it online. News and experts – this functionality
provides health awareness and threats that are prevailing. Payment – this functionality deals with
the payment for the services consumed. This functionality is split into two sub-functions namely,
payment for doctors, for the services issued and payment for online med-delivery. Feedback – this
functionality collects user reviews for this website.
System Architecture: System architecture is the conceptual model that defines the structure,
behaviour and more views of a system. An architecture description is a formal description and
representation of a system, organized in a way that supports reasoning about the structures
and behaviours of the system. This architecture diagram shown in Figure 2.1 includes all the
functionalities of the system in an ordered manner based on the sequence of occurrence of
these functionalities. It represents the complete data flow starting from the register functionality
through which the user could access the system to the logout functionality that ends the access

Register

Login

Finance Resources Drugs and


Health A-Z
supplements

News and
Payment
Experts

Feedback

Log Out

Figure 2.1 System architecture.


Design of UML Diagrams for Webmed ◾ 25

of the user to the system. Initially, the user must register onto the system. Once registered, the
user would be able to log on to the system and could access all the services offered – finance,
news and experts, resources that include finding a doctor, health A–Z that includes health calcu-
lator and fitness calculator, drug and supplements, payment and feedback. The payment is done
through the insurance for the services consumed. After consuming the services, the user could
log out of the system.

2.3 Data-Flow Diagrams
A data-flow diagram (DFD) is a way of representing a flow of a data of a process or a system.
The DFD also provides information about the outputs and inputs of each entity and the
­process itself. A DFD has no control flow; there are no decision rules and no loops. A DFD
can dive into progressively more detail by using levels and layers. DFD levels are numbered
0, 1 and 2.
DFD Level 0 is also called a Context Diagram. It is a basic overview of the whole system or
process being analyzed or modelled. It is designed to be an at-a-glance view, showing the system
as a single high-level process, with its relationship to external entities. This level 0 DFD diagram
as shown in Figure 2.2 consists of the healthcare service provider system – Webmed and the
actors who affect those systems – the users that is the patients and the service providers who
are responsible for the maintenance of the system. This is the basic diagram that could be easily
understood by a wide audience. DFD Level 1 as shown in Figure 2.3 provides a more detailed
breakout of pieces of the Context Level Diagram. We will highlight the main functions carried
out by the system, as you break down the high-level process of the Context Diagram into its
sub-processes.
These systems too have the same external entities – patients who require the service and the
service providers who offer those services via the system. The Webmed system is broken down
into a number of sub-processes. These sub-processes represent the functionalities of the system –
­register, login, finance, health A–Z, resources, drugs and supplements, news and experts, ­payment,
feedback and logout. Payment is done to find a doctor and the drugs and supplements services
provided. The user could also give the feedback for the services available. Table 2.1 describes the
comparison between the existing system and the proposed system.

Figure 2.2 Level 0 DFD.


26 ◾ UML Diagramming

Figure 2.3 Level 1 DFD.

Table 2.1 Comparison of Proposed System and Existing System


Additional Features of Proposed System with Reference to
Existing System Existing System

Register The same as that of the existing system

Login

Logout

Finance

Health A–Z It acts as a dictionary of diseases along with their symptoms.

Resources The same as that of existing system.

Drugs and supplements This functionality provides online delivery of medicines.

News and experts This functionality provides health awareness and threats that
are prevailing.

Payment The same as that of existing system.

Feedback This functionality collects user reviews for this website.


Design of UML Diagrams for Webmed ◾ 27

2.4 Proposed Design – UML Diagrams


2.4.1 Usecase Specification for the UML Usecase
Diagram Generated Using Star UML Tool

Actor Specification

1. Patient – This actor plays the role of a patient who can register on the website and can make
use of all the services provided by the website. This actor can also play a role of a caregiver.
2. Service Provider – This actor acts as the master of this website who provides certain ser-
vices. This actor maintains a database of doctors that helps a patient to find a doctor and
looks after the finance, insurance and payment requirements. He also gives descriptions
regarding various diseases that can be referred by the users. He also provides a facility for
the users to purchase drugs and other medicines online and spreads awareness through news
regarding the prevailing threats (Figure 2.4).
Usecase Specification

1. Drugs and Supplements


Description: This functionality provides online delivery of medicines.
Flow of Events
Basic Flow: It allows the users to search for and purchase drugs and other medical supplies
like sringes, bandages and dressing, earloop face masks, etc.

Figure 2.4 UML usecase diagram.


28 ◾ UML Diagramming

Alternative Flow: Alternate flow for this usecase is: Health A-Z, resources, finance, news,
and experts.
Pre-Conditions: The user must have logged on to the website to make use of this functionality.
Post-Conditions: The drugs and medicines database get updated accordingly.
2. Facilities
Description: The service provider controls all the facilities on the website through this
usecase and the user can utilize these facilities.
Flow of Events
Basic Flow: The user can obtain the services like: Health A–Z, resources, drugs and supple-
ments, news and experts, and finance.
Alternative Flow: The user can provide his feedback for improvement of the website.
Pre-Conditions: The user must have logged on to the website in order to make use of this
functionality.
Post-Conditions: By getting into this usecase, the user can make use of the available
services.
3. Feedback
Description: This Feedback section helps the users to give their honest opinions about
the quality of services that have been provided. It also helps them to give their suggestions
for further improvements.
Flow of Events
Basic Flow: It verifies whether the feedback is given or not.
Alternative Flow: LOGOUT.
Pre-Conditions: The payment function should have been completed.
Post-Conditions: The feedback form is submitted.
4. Finance
Description: Negotiations regarding the financial status are done, eligibility for the
insurance is checked and the appropriate schemes are issued.
Flow of Events
Basic Flow: It checks if the user has availed any insurance for his health if not it checks for
insurance availability.
Alternative Flow: Instead of this usecase, the following usecases can be executed: Health
A-Z, resources, drugs and supplements, news, and experts.
Pre-Conditions: The patients should have a valid bank account.
Post-Conditions: The patient would have insured his life.
5. Health A–Z
Description: This functionality acts as a dictionary of the diseases along with their symp-
toms and the drugs that can be consumed.
Flow of Events
Basic Flow: It provides catalogue of all the diseases with their symptoms.
Alternative Flow: Instead of this usecase, the following usecases can be executed: finance,
resources, drugs and supplements, news, and experts.
Pre-Conditions: The user should have logged onto the website.
Post-Conditions: The user is now aware of the drugs that must be consumed for a specific
disease.
6. Login
Description: This functionality allows the patients and caregivers to login into the web-
site to get the access to all the resources.
Design of UML Diagrams for Webmed ◾ 29

Flow of Events
Basic Flow: It allows the user to access all the resources that are available in the website.
Alternative Flow: After this usecase is executed, then the control flows through any one of
the following usecases: Finance, health A-Z, resources, drugs and supplements, news,
and experts.
Pre-Conditions: The user should have registered into the website.
Post-Conditions: The user is given the complete access to all the resources available on the
website.
7. Logout
Description: This functionality ends the access to the website. So the user must log in
again to access all the resources.
Flow of Events
Basic Flow: It ends the access of the resources by the user.
Alternative Flow: It has no alternate flow.
Pre-Conditions: The user should have logged onto the website.
Post-Conditions: Once this usecase is executed, the user is denied from the resources pro-
vided by this website.
8. News and Experts
Description: A bulletin of news regarding the latest diseases that prevails in the envi-
ronment, expert opinions to avoid those communicable and non-communicable diseases,
awareness about the diseases will be displayed publicly.
Flow of Events
Basic Flow: The current affairs about the diseases are well received by the users.
Alternative Flow: Instead of this usecase, the following usecases can be executed: Health
A-Z, resources, drugs and supplements, and finance.
Pre-Conditions: The user should have logged in.
Post-Conditions: The user is enlightened about the prevalent diseases.
9. Payment
Description: This functionality deals with the payment for the services consumed.
Flow of Events
Basic Flow: This functionality involves the payment for the services provided by the
doctor.
Alternative Flow: After executing this usecase, the control moves to the usecase feedback.
Pre-Conditions: The user should have consumed the services provided by the doctor or
should have purchased medicines online.
Post-Conditions: After executing this usecase, the user has made the payment for the medi-
cines purchased or the service providers have made the payment to the doctors.
10. Register
Description: This acts as a membership functionality that allows the patients or caregiv-
ers to register into this website to access all the resources
Flow of Events
Basic Flow: It allows the user to register on the website.
Alternative Flow: After the register usecase is executed, the usecase that can be executed is:
LOGIN functionality.
Pre-Conditions: This is no precondition as register is the first usecase to be executed.
Post-Conditions: After the register usecase is executed, the user will be given a Webmed
membership.

You might also like