0% found this document useful (0 votes)
46 views32 pages

Ananya SE2 Final

The document describes an experiment to create a Software Requirements Specification (SRS) document for a University Management System. It provides background on what an SRS is and its goals. The procedure outlines using an IEEE standard SRS template, which includes sections for introduction, overall description, user characteristics, functionality, and reliability among others. The SRS will define requirements for a web-based university management system to manage student information and results.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views32 pages

Ananya SE2 Final

The document describes an experiment to create a Software Requirements Specification (SRS) document for a University Management System. It provides background on what an SRS is and its goals. The procedure outlines using an IEEE standard SRS template, which includes sections for introduction, overall description, user characteristics, functionality, and reliability among others. The SRS will define requirements for a web-based university management system to manage student information and results.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Experiment – 7

Aim: Introduction to SRS and to Prepare SRS Document for University Management System.

REQUIREMENTS:

1. SOFTWARE REQUIREMENT – Microsoft Word


2. HARDWARE REQUIREMENT – Computer, Keyboard, Mouse, CPU

THEORY:

An SRS is basically an organization's understanding (in writing) of a customer or


potential client's systemrequirements and dependencies at a particular point in time
(usually) prior to any actual design or development work. It's a two-way insurance
policy that assures that both the client and the organization understand the other's
requirements from that perspective at a given point in time.
Well-designed, well-written SRS accomplishes four major goals:
i. It provides feedback to the customer.
ii. It decomposes the problem into component parts.
iii. It serves as an input to the design specification.
iv. It serves as a product validation check.

The basic issues that the SRS shall address are the following:
a. Functionality. What is the software supposed to do?
b. External interfaces. How does the software interact with people, the
system’s hardware, otherhardware, and other software?
c. Performance. What is the speed, availability, response time, recovery
time of various softwarefunctions, etc.?
d. Attributes. What is the portability, correctness, maintainability, security, etc.
considerations?

PROCEDURE:
IEEE Standard SRS Template
1. INTRODUCTION
This document aims at defining the overall software requirements for
UNIVERSITY MANAGEMENT SYSTEM. Efforts have been made to define the
requirements exhaustively and accurately. The final product will contain the
features/functionality mentioned in this document.
1.1 PURPOSE
This specification document describes the capabilities that will be
provided by the software application UNIVERSITY MANAGEMENT
SYSTEM. It also states the various required constraints by which the system will
abide. The intended audiences for this document are the development team,
testing team and end users of the product.

1.2 SCOPE
The software product UNIVERSITY MANAGEMENT SYSTEM will
be an MIS and Reporting application that will be used for result preparation

| 28 | ANANYA KHANNA 01113203120 IT-1


and management of B. Tech Program of a University. The application will
manage the information about various students enrolled in this course in
different years, the subjects offered during different semesters of the course, the
students’ choices for opting different subjects, and the marks obtained by
various students in various subjects in different semesters.

1.3 DEFINITIONS, ACRONYMS AND ABBREVIATIONS


Following abbreviations have been used throughout this document: -

B. Tech Bachelor of Technology


CSE Computer Science Engineering
IT Information Technology
EEE Electrical and Electronic Engineering
ECE Electronics and Communication Engineering
DBA Database Administrator
SRMS Student Result Management System

1.4 REFERNECES
(i) University website: For information about course structure of B. Tech
Program
(ii) IEEE Recommended Practice for Software Requirement
Specifications – IEEE Std 830-1993

1.5 OVERVIEW
The rest of this SRS document describes the various system requirements,
interfaces, featuresand functionalities in detail.

2. OVERALL DESCRIPTION
2.1 PRODUCT PERSPECTIVE
Online University Management System software is used to maintain
and manage the result of the student. This software helps the user to easy
access the result of students. This software is also helpful for the
administrator because he can easily bring changes to therecords of the
student.
2.1.1 HARDWARE INTERFACES Server Side
The web application will be hosted on one of the department’s
Linux servers and connecting to one of the school Oracle Database servers.
The web server is listeningon the web standard port, port 80. Client Side
The system is a web-based application; clients are requiring using a modern
web browser such as Mozilla Firebox 1.5, Internet Explorer 6 and Enable
Cookies. The computer must have an Internet connection in order to be
able to access the system

| 29 | ANANYA KHANNA 01113203120 IT-1


2.1.2 USER INTEFACES
All pages of the system are following a consistent theme and clear
structure. The occurrence of errors should be minimized through the use
of checkboxes, radio buttons and scroll down in order to reduce the
amount of text input from user. JavaScript implement in HTML in order to
provide a Data Check before submission.HTML Tables to display result to
give a clear structure that easy to understand by user. Error message
should be located beside the error input which clearly highlightand tell user
how to solve it. If system error, it should provide the contact methods.
The System should provide a feedback form for all users to give
comments or asking questions. It should provide a FAQ to minimize the
workload of system administrator.
2.1.3 SOFTWARE INTERFACES Server Side
The UOP already has the required software to host a Java web
application. An Apache Webserver will accept all requests from the client and
forward SUMS specific requests to
Tomcat 5.5Servlet Container with J2EE 5.0 and Strut 1.2.8 hosting
SUMS. A development database will be hosted locally (using MySQL); the
production database is hosted centrally (using Oracle). Client Side
An OS is capable of running a modern web browser which supports HTML
version 3.2or higher.

2.2 USER CHARACTERISTICS


The users of the system are students, teachers and the administrators
who maintain the system. The users are assumed to have basic knowledge of
the computers and Internet browsing. The administrators of the system to have
more knowledge of the internals of the system and is able to rectify the small
problems that may arise due to disk crashes, power failures and other
catastrophes to maintain the system. The proper user interface, user’s manual,
online help and the guide to install and maintain the system must be sufficient
to educate the users on how to use the system without any problems.
2.3 GENERAL CHARACTERISTICS
The result of all the users must be stored in a database that is accessible
by the Online University Management System. The university result security
system must be compatible with the Internet applications. The Online
University Management System is connected to the university computer and is
running all 24 hours a day. The users must have their correct usernames and
passwords to enter into the Online University Management System.
2.4 ASSUMPTIONS AND DEPENDENCIES
The users have sufficient knowledge of computers. The University
computer should have Internet connection and Internet server capabilities. The
users know the English language, as the user interface will be provided in
English. The product can access the university student database.
3. FUNCTIONAL DESCRIPTION
3.1 FUNCTIONALITY
3.1.1 LOGIN CAPABILITIES
The system shall provide the users with login capabilities.
3.1.2 MOBILE DEVICES
The Online University Management System is also supported on

| 30 | ANANYA KHANNA 01113203120 IT-1


mobile devices such as cell phones.
3.1.3 ALERTS
The system can alert the administrator in case of any problems.
3.1.4 USABILITY
The system shall allow the users to access the system from the
Internet using HTML or its derivative technologies. The system uses a web
browser as an interface. Since all users are familiar with the general usage
of browsers, no specific training is required. The system is user friendly
and self-explanatory.

3.2 RELIABILITY
The system has to be very reliable due to the importance of data
and the damages incorrector incomplete data can do.
3.3 AVAILABILITY
The system is available 100% for the user and is used 24 hrs a
day and 365 days a year. Thesystem shall be operational 24
hours a day and 7 days a week.
3.4 MEAN TIME BETWEEN FAILURES (MTBF)
The system will be developed in such a way that it may fail once in a year.
3.5 MEAN TIME TO REPAIR (MTTR)
Even if the system fails, the system will be recovered back up within an hour or
less.
3.6 ACCURACY
The accuracy of the system is limited by the accuracy of the speed
at which the employees ofthe library and users of the library use
the system.
3.7 MAXIMUM BUGS OR DEFECT RATE
Not specified.
3.8 ACCESS RELIABILITY
The system shall provide 100% access reliability.

4. PERFORMANC E RESPONSE TIME


The Splash Page or Result page should be able to be downloaded within a
minute using a 56K modem. The result is refreshed every two minutes. The access
time for a mobile device should be less than a minute. The system shall respond to
the member in not less than two seconds from the time of the request submittal.
The system shall be allowed to take more time when doing large processing jobs.

Conclusion:
Studied the software requirement specification document for UNIVERSITY
MANAGEMENT SYSTEM successfully.

| 31 | ANANYA KHANNA 01113203120 IT-1


Experiment – 8
Aim: Introduction to Data Dictionary.

A data dictionary contains metadata i.e., data about the database. The data dictionary is very
important as it contains information such as what is in the database, who is allowed to access
it, where is the database physically stored etc. The users of the database normally don't
interact with the data dictionary, it is only handled by the database administrators.

The data dictionary in general contains information about the following −

• Names of all the database tables and their schemas.


• Details about all the tables in the database, such as their owners, their security
constraints, when they were created etc.
• Physical information about the tables such as where they are stored and how.
• Table constraints such as primary key attributes, foreign key information etc.
• Information about the database views that are visible.

This is a data dictionary describing a table that contains employee details.

Field Name Data Field Size for Description Example


Type display
Employee Integer 10 Unique ID of each 1645000001
Number employee
Name Text 20 Name of the employee David
Heston
Date of Birth Date/Time 10 DOB of Employee 08/03/1995
Phone Integer 10 Phone number of 6583648648
Number employee

The different types of data dictionary are −

Active Data Dictionary

If the structure of the database or its specifications change at any point of time, it should be
reflected in the data dictionary. This is the responsibility of the database management system
in which the data dictionary resides.

So, the data dictionary is automatically updated by the database management system when
any changes are made in the database. This is known as an active data dictionary as it is self-
updating.

Passive Data Dictionary

This is not as useful or easy to handle as an active data dictionary. A passive data dictionary
is maintained separately to the database whose contents are stored in the dictionary. That
means that if the database is modified the database dictionary is not automatically updated as
in the case of Active Data Dictionary.

| 32 | ANANYA KHANNA 01113203120 IT-1


So, the passive data dictionary has to be manually updated to match the database. This needs
careful handling or else the database and data dictionary are out of sync.

Data Dictionary includes following types of notations:

Data Notation Meaning


Construct
Composition = Is composed of
Sequence + Represents AND
Selection [ |] Represents OR
Repetition { }n Represents n repetitions or repetition for n
times
Parentheses () Optional data that may or may not be
present
Comment *…* Delimits a comment or commented
information

| 33 | ANANYA KHANNA 01113203120 IT-1


Experiment – 9
Aim: To Construct any two DD from the systems given in the Experiment No. 2.
Solution:
1. Library Management System:

| 34 | ANANYA KHANNA 01113203120 IT-1


2. Hospital Management System:

| 35 | ANANYA KHANNA 01113203120 IT-1


Patient Details

Conclusion:
Data Dictionaries for Library Management system and Hospital Management System have
been drawn successfully.

| 36 | ANANYA KHANNA 01113203120 IT-1


Experiment – 10
Aim: Introduction to Sequence and Collaboration Diagrams.
Theory:
From the term Interaction, it is clear that the diagram is used to describe some type of
interactions among the different elements in the model. This interaction is a part of dynamic
behaviour of the system.
This interactive behaviour is represented in UML by two diagrams known as Sequence
diagram and Collaboration diagram. The basic purpose of both the diagrams are similar.
Sequence diagram emphasizes on time sequence of messages and collaboration diagram
emphasizes on the structural organization of the objects that send and receive messages.
Purpose of Interaction Diagrams
The purpose of interaction diagrams is to visualize the interactive behaviour of the system.
Visualizing the interaction is a difficult task. Hence, the solution is to use different types of
models to capture the different aspects of the interaction.
Sequence and collaboration diagrams are used to capture the dynamic nature but from a
different angle.
The purpose of interaction diagram is −
• To capture the dynamic behaviour of a system.
• To describe the message flow in the system.
• To describe the structural organization of the objects.
• To describe the interaction among objects.
How to Draw an Interaction Diagram?
As we have already discussed, the purpose of interaction diagrams is to capture the dynamic
aspect of a system. So, to capture the dynamic aspect, we need to understand what a
dynamic aspect is and how it is visualized. Dynamic aspect can be defined as the snapshot of
the running system at a particular moment
We have two types of interaction diagrams in UML. One is the sequence diagram and the
other is the collaboration diagram. The sequence diagram captures the time sequence of
the message flow from one object to another and the collaboration diagram describes the
organization of objects in a system taking part in the message flow.
Following things are to be identified clearly before drawing the interaction diagram
• Objects taking part in the interaction.
• Message flows among the objects.

| 37 | ANANYA KHANNA 01113203120 IT-1


• The sequence in which the messages are flowing.
• Object organization.
Following are two interaction diagrams modelling the order management system. The first
diagram is a sequence diagram and the second is a collaboration diagram
The Sequence Diagram
The sequence diagram has four objects (Customer, Order, SpecialOrder and NormalOrder).
The following diagram shows the message sequence for SpecialOrder object and the same
can be used in case of NormalOrder object. It is important to understand the time sequence
of message flows. The message flow is nothing but a method call of an object.
The first call is sendOrder () which is a method of Order object. The next call is confirm ()
which is a method of SpecialOrder object and the last call is Dispatch () which is a method of
SpecialOrder object. The following diagram mainly describes the method calls from one
object to another, and this is also the actual scenario when the system is running.

The Collaboration Diagram


The second interaction diagram is the collaboration diagram. It shows the object
organization as seen in the following diagram. In the collaboration diagram, the method call
sequence is indicated by some numbering technique. The number indicates how the
methods are called one after another. We have taken the same order management system
to describe the collaboration diagram.

| 38 | ANANYA KHANNA 01113203120 IT-1


Method calls are similar to that of a sequence diagram. However, difference being the
sequence diagram does not describe the object organization, whereas the collaboration
diagram shows the object organization.
To choose between these two diagrams, emphasis is placed on the type of requirement. If
the time sequence is important, then the sequence diagram is used. If organization is
required, then collaboration diagram is used.

Where to Use Interaction Diagrams?


We have already discussed that interaction diagrams are used to describe the dynamic
nature of a system. Now, we will look into the practical scenarios where these diagrams are
used. To understand the practical application, we need to understand the basic nature of
sequence and collaboration diagram.
The main purpose of both the diagrams are similar as they are used to capture the dynamic
behaviour of a system. However, the specific purpose is more important to clarify and
understand.
Sequence diagrams are used to capture the order of messages flowing from one object to
another. Collaboration diagrams are used to describe the structural organization of the
objects taking part in the interaction. A single diagram is not sufficient to describe the
dynamic aspect of an entire system, so a set of diagrams are used to capture it as a whole.
Interaction diagrams are used when we want to understand the message flow and the
structural organization. Message flow means the sequence of control flow from one object
to another. Structural organization means the visual organization of the elements in a
system.

| 39 | ANANYA KHANNA 01113203120 IT-1


Interaction diagrams can be used −
• To model the flow of control by time sequence.
• To model the flow of control by structural organizations.
• For forward engineering.
• For reverse engineering.

| 40 | ANANYA KHANNA 01113203120 IT-1


Experiment – 11
Aim: Draw any two sequence and collaboration diagrams from the systems given in
Experiment No.2
Solution:
1. Library Management system

2. Hospital Management System

| 41 | ANANYA KHANNA 01113203120 IT-1


Conclusion:
Sequence and collaboration diagram for Library Management system and Hospital
Management System have been drawn successfully.

| 42 | ANANYA KHANNA 01113203120 IT-1


Experiment – 12
Aim: Introduction to Class Diagrams.
Theory:
Class diagram is a static diagram. It represents the static view of an application. Class
diagram is not only used for visualizing, describing, and documenting different aspects of a
system but also for constructing executable code of the software application.
Class diagram describes the attributes and operations of a class and also the constraints
imposed on the system. The class diagrams are widely used in the modelling of object-
oriented systems because they are the only UML diagrams, which can be mapped directly
with object-oriented languages.
Class diagram shows a collection of classes, interfaces, associations, collaborations, and
constraints. It is also known as a structural diagram.
Purpose of Class Diagrams
The purpose of class diagram is to model the static view of an application. Class diagrams
are the only diagrams which can be directly mapped with object-oriented languages and
thus widely used at the time of construction.
UML diagrams like activity diagram, sequence diagram can only give the sequence flow of
the application, however class diagram is a bit different. It is the most popular UML diagram
in the coder community.
The purpose of the class diagram can be summarized as −
• Analysis and design of the static view of an application.
• Describe responsibilities of a system.
• Base for component and deployment diagrams.
• Forward and reverse engineering.
Vital components of a Class Diagram:

| 43 | ANANYA KHANNA 01113203120 IT-1


1. Upper Section: The upper section encompasses the name of the class. A class is a
representation of similar objects that shares the same relationships, attributes,
operations, and semantics. Some of the following rules that should be taken into
account while representing a class are given below:
Capitalize the initial letter of the class name. Place the class name in the center of
the upper section. A class name must be written in bold format.
The name of the abstract class should be written in italics format.
2. Middle Section: The middle section constitutes the attributes, which describe the
quality of the class. The attributes have the following characteristics:
• The attributes are written along with its visibility factors, which are public
(+), private(-), protected (#), and package (~).

• The accessibility of an attribute class is illustrated by the visibility factors.

• A meaningful name should be assigned to the attribute, which will explain


its usage inside the class.
3. Lower Section: The lower section contains methods or operations. The
methods are represented in theform of a list, where each method is written
in a single line. It demonstrates how a class interacts with data.

How to Draw a Class Diagram?


Class diagrams are the most popular UML diagrams used for construction of software
applications. It is very important to learn the drawing procedure of class diagram.
Class diagrams have a lot of properties to consider while drawing but here the diagram will
be considered from a top-level view.
Class diagram is basically a graphical representation of the static view of the system and
represents different aspects of the application. A collection of class diagrams represents the
whole system.
The following points should be remembered while drawing a class diagram −
• The name of the class diagram should be meaningful to describe the aspect of the
system.
• Each element and their relationships should be identified in advance.
• Responsibility (attributes and methods) of each class should be clearly identified
• For each class, minimum number of properties should be specified, as unnecessary
properties will make the diagram complicated.
• Use notes whenever required to describe some aspect of the diagram. At the end of
the drawing it should be understandable to the developer/coder.

| 44 | ANANYA KHANNA 01113203120 IT-1


• Finally, before making the final version, the diagram should be drawn on plain paper
and reworked as many times as possible to make it correct.
The following diagram is an example of an Order System of an application. It describes a
particular aspect of the entire application.
• First of all, Order and Customer are identified as the two elements of the system.
They have a one-to-many relationship because a customer can have multiple orders.
• Order class is an abstract class and it has two concrete classes (inheritance
relationship) SpecialOrder and NormalOrder.
• The two inherited classes have all the properties as the Order class. In addition, they
have additional functions like dispatch () and receive ().
The following class diagram has been drawn considering all the points mentioned above.

Where to Use Class Diagrams?


Class diagram is a static diagram and it is used to model the static view of a system. The
static view describes the vocabulary of the system.
Class diagram is also considered as the foundation for component and deployment
diagrams. Class diagrams are not only used to visualize the static view of the system but
they are also used to construct the executable code for forward and reverse engineering of
any system.
Generally, UML diagrams are not directly mapped with any object-oriented programming
languages but the class diagram is an exception.

| 45 | ANANYA KHANNA 01113203120 IT-1


Class diagram clearly shows the mapping with object-oriented languages such as Java, C++,
etc. From practical experience, class diagram is generally used for construction purpose.
In a nutshell it can be said, class diagrams are used for −
• Describing the static view of the system.
• Showing the collaboration among the elements of the static view.
• Describing the functionalities performed by the system.
• Construction of software applications using object-oriented languages.

| 46 | ANANYA KHANNA 01113203120 IT-1


Experiment – 13
Aim: Draw any two class diagrams from the systems given in Experiment No.2
Solution:
1. Library Management System

2. Hospital Management System

| 47 | ANANYA KHANNA 01113203120 IT-1


Conclusion:
Class diagram for Library Management system and Hospital Management System have been
drawn successfully.

| 48 | ANANYA KHANNA 01113203120 IT-1


Experiment – 14
Aim: Introduction to Activity Diagram.
Theory:
Activity diagram is another important diagram in UML to describe the dynamic aspects of
the system.
Activity diagram is basically a flowchart to represent the flow from one activity to another
activity. The activity can be described as an operation of the system.
The control flow is drawn from one operation to another. This flow can be sequential,
branched, or concurrent. Activity diagrams deal with all type of flow control by using
different elements such as fork, join, etc

Symbol Name Use

Start/ Initial Used to represent the starting point or the


Node initial state of an activity

Activity / Used to represent the activities of the


Action State process

Action Used to represent the executable sub-areas


of an activity

Control Flow Used to represent the flow of control from


one action to the other
/ Edge

Object Flow Used to represent the path of objects moving


through the activity
/
ControlEdge

Activity Final Used to mark the end of all control flows


Node withinthe activity

Flow Used to mark the end of a single control flow


Final Node

| 49 | ANANYA KHANNA 01113203120 IT-1


Decision Used to represent a conditional branch point
Node with one input and multiple outputs

Merge Node Used to represent the merging of flows. It has


several inputs, but one output.

Fork Used to represent a flow that may branch


intotwo or more parallel flows

Merge Used to represent two inputs that merge into


one output

Purpose of Activity Diagrams


The basic purposes of activity diagrams are similar to other four diagrams. It captures the
dynamic behaviour of the system. Other four diagrams are used to show the message flow
from one object to another but activity diagram is used to show message flow from one
activity to another.
Activity is a particular operation of the system. Activity diagrams are not only used for
visualizing the dynamic nature of a system, but they are also used to construct the
executable system by using forward and reverse engineering techniques. The only missing
thing in the activity diagram is the message part.
It does not show any message flow from one activity to another. Activity diagram is
sometimes considered as the flowchart. Although the diagrams look like a flowchart, they
are not. It shows different flows such as parallel, branched, concurrent, and single.
The purpose of an activity diagram can be described as −
• Draw the activity flow of a system.
• Describe the sequence from one activity to another.
• Describe the parallel, branched and concurrent flow of the system.
How to Draw an Activity Diagram?
Activity diagrams are mainly used as a flowchart that consists of activities performed by the
system. Activity diagrams are not exactly flowcharts as they have some additional
capabilities. These additional capabilities include branching, parallel flow, swim lane, etc.
Before drawing an activity diagram, we must have a clear understanding about the elements
used in activity diagram. The main element of an activity diagram is the activity itself. An
activity is a function performed by the system. After identifying the activities, we need to
understand how they are associated with constraints and conditions.
Before drawing an activity diagram, we should identify the following elements −

| 50 | ANANYA KHANNA 01113203120 IT-1


• Activities
• Association
• Conditions
• Constraints
Once the above-mentioned parameters are identified, we need to make a mental layout of
the entire flow. This mental layout is then transformed into an activity diagram.
Following is an example of an activity diagram for order management system. In the
diagram, four activities are identified which are associated with conditions. One important
point should be clearly understood that an activity diagram cannot be exactly matched with
the code. The activity diagram is made to understand the flow of activities and is mainly
used by the business users
Following diagram is drawn with the four main activities −
• Send order by the customer
• Receipt of the order
• Confirm the order
• Dispatch the order
After receiving the order request, condition checks are performed to check if it is normal or
special order. After the type of order is identified, dispatch activity is performed and that is
marked as the termination of the process.

| 51 | ANANYA KHANNA 01113203120 IT-1


Where to Use Activity Diagrams?
The basic usage of activity diagram is similar to other four UML diagrams. The specific usage
is to model the control flow from one activity to another. This control flow does not include
messages.
Activity diagram is suitable for modelling the activity flow of the system. An application can
have multiple systems. Activity diagram also captures these systems and describes the flow
from one system to another. This specific usage is not available in other diagrams. These
systems can be database, external queues, or any other system.
We will now look into the practical applications of the activity diagram. From the above
discussion, it is clear that an activity diagram is drawn from a very high level. So, it gives high
level view of a system. This high-level view is mainly for business users or any other person
who is not a technical person.
This diagram is used to model the activities which are nothing but business requirements.
The diagram has more impact on business understanding rather than on implementation
details.
Activity diagram can be used for −
• Modelling work flow by using activities.
• Modelling business requirements.
• High level understanding of the system's functionalities.
• Investigating business requirements at a later stage.

| 52 | ANANYA KHANNA 01113203120 IT-1


Experiment – 15
Aim: Draw any two-activity diagram from the systems given in Experiment No.2
Solution:
1. Library Management System

2. Hospital Management System

| 53 | ANANYA KHANNA 01113203120 IT-1


Conclusion:
Activity Diagram for Library Management system and hospital management system has
been drawn successfully.

| 54 | ANANYA KHANNA 01113203120 IT-1


Experiment – 16
Aim: Introduction to State Transition Diagram.
Theory:
The name of the diagram itself clarifies the purpose of the diagram and other details. It
describes different states of a component in a system. The states are specific to a
component/object of a system.
A State Transition diagram describes a state machine. State machine can be defined as a
machine which defines different states of an object and these states are controlled by
external or internal events.
Activity diagram explained in the next chapter, is a special kind of a State Transition
diagram. As State Transition diagram defines the states, it is used to model the lifetime of an
object.
Purpose of State Transition Diagrams
State Transition diagram is one of the five UML diagrams used to model the dynamic nature
of a system. They define different states of an object during its lifetime and these states are
changed by events. State Transition diagrams are useful to model the reactive systems.
Reactive systems can be defined as a system that responds to external or internal events.
State Transition diagram describes the flow of control from one state to another state.
States are defined as a condition in which an object exists and it changes when some event
is triggered. The most important purpose of State Transition diagram is to model lifetime of
an object from creation to termination.
State Transition diagrams are also used for forward and reverse engineering of a system.
However, the main purpose is to model the reactive system.
Following are the main purposes of using State Transition diagrams −
• To model the dynamic aspect of a system.
• To model the life time of a reactive system.
• To describe different states of an object during its life time.
• Define a state machine to model the states of an object.
How to Draw a State Transition Diagram?
State Transition diagram is used to describe the states of different objects in its life cycle.
Emphasis is placed on the state changes upon some internal or external events. These states
of objects are important to analyse and implement them accurately.
State Transition diagrams are very important for describing the states. States can be
identified as the condition of objects when a particular event occurs.

| 55 | ANANYA KHANNA 01113203120 IT-1


Before drawing a State Transition diagram, we should clarify the following points −
• Identify the important objects to be analysed.
• Identify the states.
• Identify the events.
Following is an example of a State Transition diagram where the state of Order object is
analysed
The first state is an idle state from where the process starts. The next states are arrived for
events like send request, confirm request, and dispatch order. These events are responsible
for the state changes of order object.
During the life cycle of an object (here order object) it goes through the following states and
there may be some abnormal exits. This abnormal exit may occur due to some problem in
the system. When the entire life cycle is complete, it is considered as a complete transaction
as shown in the following figure. The initial and final state of an object is also shown in the
following figure.

Where to Use State Transition Diagrams?


From the above discussion, we can define the practical applications of a State Transition
diagram. State Transition diagrams are used to model the dynamic aspect of a system like
other four diagrams discussed in this tutorial. However, it has some distinguishing
characteristics for modelling the dynamic nature.

| 56 | ANANYA KHANNA 01113203120 IT-1


State Transition diagram defines the states of a component and these state changes are
dynamic in nature. Its specific purpose is to define the state changes triggered by events.
Events are internal or external factors influencing the system.
State Transition diagrams are used to model the states and also the events operating on the
system. When implementing a system, it is very important to clarify different states of an
object during its life time and State Transition diagrams are used for this purpose. When
these states and events are identified, they are used to model it and these models are used
during the implementation of the system.
If we look into the practical implementation of State Transition diagram, then it is mainly
used to analyse the object states influenced by events. This analysis is helpful to understand
the system behaviour during its execution.
The main usage can be described as −
• To model the object states of a system.
• To model the reactive system. Reactive system consists of reactive objects.
• To identify the events responsible for state changes.
• Forward and reverse engineering.

| 57 | ANANYA KHANNA 01113203120 IT-1


Experiment – 17
Aim: Draw any two state transition diagrams from the systems given in Experiment No.2
Solution:
1. Library Management System

| 58 | ANANYA KHANNA 01113203120 IT-1


2. Hospital Management System

Conclusion:
State transition Diagram for Library Management system and hospital management system
has been drawn successfully.

| 59 | ANANYA KHANNA 01113203120 IT-1

You might also like