Preview-9781000587265 A42846009
Preview-9781000587265 A42846009
Preview-9781000587265 A42846009
Study Approach
UML Diagramming
A Case Study Approach
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.
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
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
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).
DOI: 10.1201/9781003287124-1 1
2 ◾ UML Diagramming
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
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.
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
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 Association
2 Directed
Association
3 Include
4 Extend
(Continued)
6 ◾ UML Diagramming
5 Generalization
6 Dependency
1.1.2.1 Usecase Template
Every usecase is explained in detail through a standard template called as usecase template.
Preconditions – state of the system before executing this functionality of the usecase.
Post Conditions – state of the system after executing this functionality of the usecase.
1 Initial state
2 Final state
(Continued)
8 ◾ UML Diagramming
5 Object • An entity that carries data between any two action states.
(Continued)
UML Diagrams and Its Components ◾ 9
(Continued)
10 ◾ UML Diagramming
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.
(Continued)
UML Diagrams and Its Components ◾ 11
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.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
(Continued)
UML Diagrams and Its Components ◾ 13
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.
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.
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
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.
(Continued)
18 ◾ UML Diagramming
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.
(Continued)
UML Diagrams and Its Components ◾ 19
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.
4 Artifact • Scripting files like PHP, database files, configuration files, rar files,
executable files.
2 Artifact • Scripting files like PHP, database files, configuration files, rar files,
executable files.
(Continued)
22 ◾ UML Diagramming
S. Name of the
No Component UML Notation and the Purpose of the Component
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
Register
Login
News and
Payment
Experts
Feedback
Log Out
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.
Login
Logout
Finance
News and experts This functionality provides health awareness and threats that
are prevailing.
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
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.