Experiment No.-1
Experiment No.-1
Experiment No.-1
-1
AIM : Prepare a SRS document in line with the IEEE recommended standards.
2.1.5 Overview
2.1.5.1 The SRS contains an analysis of the requirements necessary to help easy
design.
2.1.5.2 The overall description provides interface requirements for the Airline
Reservation system, product perspective, hardware interfaces software
interfaces,, communication interface, memory constraints, product
functions, user characteristics and other constraints.
2.1.5.3 Succeeding pages illustrate the characteristics of typical naïve users
accessing the system along with legal and functional constraints enforced
that affect Airline Reservation system in any fashion.
8
Experiment No.-2
AIM: Draw the use case diagram and specify the role of each of the actors. Also state the
precondition,post condition and function of each use case.
Use_Case Diagram:
The book bank use cases are:
1. book_issue
2. book_return
3. book_order
4. book_entry
5. search book_details
Actors Involved:
1. Student
2. Librarian
3. Vendor
The librarian initiates this use case when any member returns or request the book and
checking if thebook is available.
Precondition: The librarian should enter all Book details.
Normal Flow: Build message for librarian who search the book.
Post Condition: Send message to respective member who reserved the book.
9
Usecase Name : Book_ Issue
Initiated by librarian when any member wants to borrow the desired book. If the book is
available,the book is issued.
Precondition: Member should be valid member of library.
Normal Flow: Selected book will be issued to the member.
Alternative Flow: If book is not available then reserved book use case should be initiate.
PostCondition: Update the catalogue.
10
11
Figure 1. Usecase diagram for Book Bank System
12
Experiment No.-3
AIM: Draw the ER Diagram
ER Diagram
Entity
Entities are represented by means of rectangles. Rectangles are named with the entity set
they represent.
Attributes
Attributes are the properties of entities. Attributes are represented by means of ellipses. Every
ellipse represents one attribute and is directly connected to its entity (rectangle). If the
attributes are composite, they are further divided in a tree like structure. Every node is then
connected to its attribute.
Composite attributes are represented by ellipses that are connected with an ellipse.
One-to-one − When only one instance of an entity is associated with the relationship,
it is marked as '1:1'. The following image reflects that only one instance of each entity
should be associated with the relationship. It depicts one-to-one relationship.
13
of entity on the left and more than one instance of an entity on the right can be
associated with the relationship. It depicts one-to-many relationship.
Many-to-one − When more than one instance of entity is associated with the
relationship, it is marked as 'N:1'. The following image reflects that more than one
instance of an entity on the left and only one instance of an entity on the right can be
associated with the relationship. It depicts many-to-one relationship.
Many-to-many − The following image reflects that more than one instance of an entity
on the left and more than one instance of an entity on the right can be associated with
the relationship. It depicts many-to-many relationship.
Participation Constraints
Partial participation − Not all entities are involved in the relationship. Partial
participation is represented by single lines.
14
15
16
17
Experiment No.-4
AIM: Draw the activity diagram.
Activity Diagram
Activity diagrams are mainly used as a flow chart consists of activities performed by the
system. But activity diagram are not exactly a flow chart as they have some additional
capabilities. These additional capabilities include branching, parallel flow, swimlane 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.
The 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 mainly used
by the business users.
Confirm order
Dispatch 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.
18
19
20
Experiment No.-5
AIM : Identify the classes. Classify them as weak and strong classes and draw the class
diagram.
Class Diagram
The 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.
The 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.
The class diagram shows a collection of classes, interfaces, associations, collaborations and
constraints. It is also known as a structural diagram.
Class diagram is basically a graphical representation of the static view of the system and
represents different aspects of the application. So a collection of class diagrams represent the
whole system.
First of all Order and Customer are identified as the two elements of the system and
they have a one to many relationship because a customer can have multiple orders.
We would keep 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 ().
21
So the following class diagram has been drawn considering all the points mentioned above:
22
23
Experiment No.-6
AIM : Draw the sequence diagram for any two scenarios.
Sequence Diagram
The Sequence Diagram models the collaboration of objects based on a time sequence. It shows
how the objects interact with others in a particular scenario of a use case. With the advanced
visual modeling capability, you can create complex sequence diagram in few clicks. Besides,
Visual Paradigm can generate sequence diagram from the flow of events which you have
defined in the use case description.
24
ATM System
25
Experiment No.-7
AIM : Draw the collaboration diagram.
Collaboration Diagram
When creating collaboration diagrams, patterns are used to justify relationships. Patterns are
best principles for assigning responsibilities to objects and are described further in the section
on patterns. There are two main types of patterns used for assigning responsibilities which are
evaluative patterns and driving patterns.
26
27
Experiment No.-8
A Statechart diagram describes a state machine. Now to clarify it 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.
hey define different states of an object during its lifetime. And these states are changed by
events. So Statechart diagrams are useful to model reactive systems. Reactive systems can be
defined as a system that responds to external or internal events.
Statechart 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.
So the most important purpose of Statechart diagram is to model life time of an object from
creation to termination.
Statechart diagrams are also used for forward and reverse engineering of a system. But the
main purpose is to model reactive system.
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 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 exists also. This abnormal exit may occur due to some problem
in the system. When the entire life cycle is complete it is considered as the complete
transaction as mentioned below.
28
The initial and final state of an object is also shown below.
29
Experiment No.-9
AIM : Draw the component diagram.
Component Diagram
Component diagrams are different in terms of nature and behaviour. Component diagrams are
used to model physical aspects of a system. Component diagram is a special kind of diagram
in UML. The purpose is also different from all other diagrams discussed so far. It does not
describe the functionality of the system but it describes the components used to make those
functionalities. They can also be described as a static implementation view of a system. Static
implementation represents the organization of the components at a particular moment.
The following is a component diagram for order management system. Here the artifacts are
files. So the diagram shows the files in the application and their relationships. In actual the
component diagram also contains dlls, libraries, folders etc.
In the following diagram four files are identified and their relationships are produced.
Component diagram cannot be matched directly with other UML diagrams discussed so far.
Because it is drawn for completely different purpose.
30
So the following component diagram has been drawn considering all the points mentioned
above:
31
Experiment No.-10
AIM: Draw the deployment diagram
Deployment Diagram
The name Deployment itself describes the purpose of the diagram. Deployment diagrams are
used for describing the hardware components where software components are deployed.
Component diagrams and deployment diagrams are closely related.
Component diagrams are used to describe the components and deployment diagrams shows
how they are deployed in hardware.
The following deployment diagram is a sample to give an idea of the deployment view of
order management system. Here we have shown nodes as:
Monitor
Modem
Caching server
Server
32
33
Experiment No.-11
AIM: Draw the Data Flow Diagram.
DFD
A DFD provides no information about the timing or ordering of processes, or about whether
processes will operate in sequence or in parallel. It is therefore quite different from a flowchart,
which shows the flow of control through an algorithm, allowing a reader to determine what
operations will be performed, in what order, and under what circumstances, but not what kinds
of data will be input to and output from the system, nor where the data will come from and go
to, nor where the data will be stored (all of which are shown on a DFD).
It is common practice to draw a context-level data flow diagram first, which shows the
interaction between the system and external agents which act as data sources and data sinks.
On the context diagram (also known as the Level 0 DFD) the system's interactions with the
outside world are modeled purely in terms of data flows across the system boundary. The
context diagram shows the entire system as a single process, and gives no clues as to its internal
organization.
This context-level DFD is next "exploded", to produce a Level 1 DFD that shows some of the
detail of the system being modeled. The Level 1 DFD shows how the system is divided into
sub-systems (processes), each of which deals with one or more of the data flows to or from an
external agent, and which together provide all of the functionality of the system as a whole.
34
Context Diagram
35
Level-1 DFD
36
37
Level-2 DFD of Login
38
Level-2 DFD of User account
Maintenance
39
Level-2 DFD of Subject information management
40