Uml Final

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 70

SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

OBJECT
ORIENTED
ANALYSIS AND
DESIGN

SOFTWARE LAB 2 Page 1


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

EXPNO: 1 DATE:11-07-12

CONCEPTUAL MODEL OF UML

AIM:

To study the conceptual model of the UML.

CONCEPTUAL MODEL OF THE UML:

The conceptual model of the UML consists of three major elements:

1. Basic Building Blocks.


2. Rules.
3. Common Mechanisms.

BUILDING BLOCKS OF THE UML:

The vocabulary of the UML encompasses three kinds of building blocks:

1. Things.
2. Relationships.
3. Diagrams.

THINGS:

Things are the abstractions that are first-class citizens in a model. There are four kinds of
things in the UML.

1. Structural things.
2. Behavioral things.
3. Grouping things.
4. Annotational things.

STRUCTURAL THINGS:

Structural things are the nouns of the UML models. These are the mostly static parts of a
model, representing elements that are either conceptual or physical.

SOFTWARE LAB 2 Page 2


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

There are seven kinds of structural things.

1. CLASS:

A class is a description of a set of objects that share the same attributes, operations,
relationships, and semantics. A class implements one or more interfaces.

Graphically, a class is rendered as a rectangle, usually including its name, attributes, and
operations.

Graphical Representation Example

ClassName Window
Attributes origin
size
Operations()
open()
close()
display()

2. INTERFACE:

An interface is a collection of operations that specify a service of a class or component.


An interface therefore describes the externally visible behavior of that element. An interface
might represent the complete behavior of a class or components or only a part of that behavior.
An interface defines a set of operation specifications that is, their signatures but never a set of
operation implementations.

Graphically, an interface is rendered as a circle together with its name.

Graphical Representation Example

SOFTWARE LAB 2 Page 3


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

IName ISpelling

3. COLLABORATION:

Collaboration defines an interaction and is a society of roles and other elements that work
together to provide some cooperative behavior that is bigger than the sum of all the elements.
Therefore, collaborations have structural, as well as behavioral, dimensions. A given class might
participate in several collaborations. These collaborations therefore represent the implementation
of patterns that make up a system.

Graphically, collaboration is rendered as an ellipse with dashed lines, usually including


only its name.

Graphical Representation Example

4. USECASE:

A use case is a description of a set of sequence of actions that a system performs that
yields an observable result of value to a particular actor. A use case is used to structure the
behavioral things in a model. A use case is realized by collaboration.

Graphically, a use case is rendered as an ellipse with solid lines, usually including only its
name.

Graphical Representation Example

SOFTWARE LAB 2 Page 4


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Name

Place order

5. ACTIVE CLASS:

An active class is a class whose objects own one or more processes or threads and
therefore can initiate control activity. An active class is just like a class except that its objects
represent elements whose behavior is concurrent with other elements.

Graphically, an active class is rendered just like a class but with heavy lines, usually
including its name, attributes, and operations.

Graphical Representation Example

6. COMPONENT:

A component is a physical and replaceable part of a system that conforms to and provides
the realization of a set of interfaces. A component typically represents the physical packaging of
otherwise logical elements, such as classes, interfaces, and collaborations.

Graphically, a component is rendered as a rectangle with tabs, usually including only its
name.

Graphical Representation Example

Orderform.java
Component
Name

SOFTWARE LAB 2 Page 5


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

7. NODE:

A node is a physical element that exists at run time and represents a computational
resource, generally having at least some memory and, often, processing capability. A set of
components may reside on a node and may also migrate from node to node.

Graphically, a node is rendered as a cube, usually including only its name.

Graphical Representation Example

BEHAVIORAL THINGS:

Behavioral things are the dynamic parts of UML models. These are the verbs of a model,
representing behavior over time and space.

There are two primary kinds of behavioral things.

1. INTERACTION:
An interaction is a behavior that comprises a set of messages exchanged among a set of
objects within a particular context to accomplish a specific purpose. The behavior of a
society of objects of an individual operation may be specified with an interaction. An
interaction involves a number of other elements, including messages, action sequences,
and links.

Graphically, a message is rendered as a directed line, almost always including the name
of its operation.

Graphical Representation Example

SOFTWARE LAB 2 Page 6


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

2. STATE MACHINE:

A state machine is a behavior that specifies the sequences of states an object or an


interaction goes through during its lifetime in response to events, together with its responses to
those events. The behavior of an individual class or a collaboration of classes may be specified
within a state machine. A state machine involves a number of other elements, including states,
transitions, and activities.

Graphically, a state machine is rendered as a rounded rectangle, usually including its


name and its sub states.

Graphical Representation Example

3. GROUPING THINGS:

Grouping things are the organizational parts of UML models. These are the boxes into
which a model can be decomposed.

There is one primary kind of grouping thing, namely, packages.

PACKAGE:

A package is a general-purpose mechanism for organizing elements into groups.


Structural things, behavioral things, and even other grouping things may be placed in a package.

Graphically, a package is rendered as a tabbed folder, usually including its name, and
sometimes, its contents.

Graphical Representation Example

Name Business rules

SOFTWARE LAB 2 Page 7


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

4. ANNOTATIONAL THINGS:

An notational things are the explanatory parts of UML models. These are the comments
you may apply to describe, illuminate, and remark about any element in a model.

There is one primary kind of an notational thing, called note.

NOTE:

A note is a symbol for rendering constraints and comments attached to an element or a


collection of elements.

Graphically, a note is rendered as a rectangle with a dog-eared corner, together with a


textual or a graphical comment.

Graphical Representation Example

Comments Return copy of


self

RELATIONSHIPS:

A relationship is a connection among things.in object oriented modeling, the four most
important relationships are

1. Dependency.

2. Generalization.

3. Association.

4. Realization.

Graphically, a relationship is rendered as a path, with different kinds of lines used to distinguish
the kind of relationships.

DEPENDENCY:

SOFTWARE LAB 2 Page 8


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Dependency is a using relationship that states that a change in specification of one thing
(example: class EVENT) may affect another thing that uses it (example: WINDOW), but not
necessarily the reverse. Use dependency when you want to show one thing using another.

Graphically a dependency is rendered as a dashed directed line. In the UML you can also
create dependencies among many other things, especially notes and packages.

Graphical representation Example

Circle
Point
Move(p:point)()

GENERALIZATION:

Generalization is a relationship between general things (called superclass or parent) and a


more specific kind of that thing (subclass or child).generalization means that the child is
substitutable for the parent. A child inherits the properties of its parent, especially their attributes
and operations

Graphically, generalization is rendered as a solid directed line with a large open arrowhead,
pointing to the parent. Most often, you will use generalizations among classes and interfaces to
show inheritance relationships.in the UML,you can also create generalizations among other
things-most notably, packages.

Graphical representation Example

SOFTWARE LAB 2 Page 9


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Circle

Graphic circle

ASSOCIATION:

An association is a structural relationship that specifies that object of one thing is connected
to objects of another. Given an association connecting two classes, you can navigate from an
object of one class to an object of the other class, and vice versa.

Graphically, an association is rendered as a solid line connecting the same or different classes.

Graphical representation Example

Student 1..5 course


1 takes

REALIZATION:

It is a semantic relationship between classifiers, where in one classifier specifies a


contract that another classifier guarantees to carry out.

Graphically it is rendered as a cross between a generalization and a dependency relationship.

Graphical representation Example

SOFTWARE LAB 2 Page 10


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

DIAGRAMS:

A diagram is the graphical presentation of a set of elements, most often rendered as a


connected graph of vertices (things) and arcs (relationships).

The UML includes 9 types of diagrams they are:

1. Class diagram.

2. Object diagram.

3. Use case diagram.

4. Sequence diagram.

5. Collaboration diagram.

6. State chart diagram.

7. Activity diagram.

8. Component diagram.

9. Deployment diagram.

1. CLASS DIAGRAM:

A Class diagram shows a set of classes, interfaces, collaboration and their relationships.
These diagrams are the most common diagrams found in modeling object-oriented systems.

SOFTWARE LAB 2 Page 11


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Class diagram address the static design view of a system. Class diagram that include active
classes address the static process view of a system.

Contents:

Class diagram commonly contain the following things:

 Classes
 Interfaces
 Collaborations
 Dependency, Generalization, and Association relationships

2. OBJECT DIAGRAM:

An Object diagram shows a set of objects and their relationships. Object diagram
represents static snapshots of instances of things found in class diagrams. These diagram address
the static design view or static process view of a system as do class diagram, but from the
perspective of real or prototypical cases.

Contents:

Object diagram commonly contain

 Objects
 Links

3. USE CASE DIAGRAMS:

A Use case diagram shows a set of use cases and their actors and their relationships. Use
case diagrams address the static use case view of a system. These diagrams are especially
important in organizing and modeling the behaviors of a system

Contents:

Use case diagram commonly contain

 Use cases
 Actors
 Dependency, Generalization and Association relationships

SOFTWARE LAB 2 Page 12


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

INTERACTION DIAGRAMS:

An Interaction diagram shows an interaction, consisting of a set of objects and their


relationships, including the messages that may be dispatched among them. Interaction diagrams
addresses the dynamic view of a system

Contents:

Interaction diagrams commonly contain

 Objects
 Links
 Messages

Interaction diagrams are of two types. They are

1. Sequence Diagram.

2. Collaboration Diagram.

4. SEQUENCE DIAGRAM:

A Sequence Diagram is an interaction diagram that emphasizes the time-ordering of


messages.

5. COLLABORATION DIAGRAM:

A Collaboration diagram is an interaction diagram that emphasizes the structural


organization of the objects that send and receive messages

6. STATE CHART DIAGRAM:

A State chart diagram shows a state machine, consisting of states, transitions, events and
machines. State chart diagram addresses the dynamic view of a system. They are especially
important in modeling the behavior of an interface, class, or collaboration and emphasize the
event-ordered behavior of an object ,which is especially useful in modeling reactive systems.

SOFTWARE LAB 2 Page 13


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Contents:

State chart diagrams commonly contain

 Simple states and Composite states


 Transitions, including events and actions

7. ACTIVITY DIAGRAM:

An Activity diagram is a special kind of a state chart diagram that shows the flow from
activity to activity within a system. Activity diagram address the dynamic view of a system. They
are especially important in modeling the function of a system and emphasize the flow of control
among objects.

Contents:

Activity Diagrams commonly contain

 Activity states and action states


 Transitions
 Objects

8. COMPONENT DIAGRAM:

Definition:

A Component diagram shows the organization and dependencies among a set of


components. Component diagrams address the static implementation view of a system.

Contents:

Component Diagrams commonly contain

 Components
 Interfaces
 Dependency, generalization, association, and realization relationships

9. DEPLOYMENT DIAGRAM:

SOFTWARE LAB 2 Page 14


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

A Deployment diagram shows the configuration of run-time processing nodes and the
components that live on them. Deployment diagram address the static deployment view of
architecture. They are related to component diagrams in that a node typically encloses one or
more components

Contents:

Deployment Diagrams commonly contain

 Nodes
 Dependency and association relationships

RULES:

The UML building blocks can’t simply be thrown together in a random fashion. Like any
language, the UML has a number of rules that specify what a well formed model should look
like.

The UML has five semantic rules

Names : What you can call things,relationships,and diagrams.

Scope: The context that you give specific meaning to a name.

Visibility: How those names can be seen and used by others.

Integrity: How things properly and consistently relate to one another.

Execution: what it means to run or simulate a dynamic model.

Models built during the development of a software-intensive system tend to evolve and may be
viewed by many stack holders in different ways and at different times. For this reason, it is
common for the development team to not only built models that are well-formed, but also to
build models that are

Elided: Certain elements are hidden to simplify the view.

SOFTWARE LAB 2 Page 15


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Incomplete: Certain elements may be missing.

Inconsistent: The integrity of the model is not guaranteed.

COMMON MECHANISMS IN THE UML:

A building is made simpler and more harmonious by the conformance to a pattern of common
features. A house may be built in the Victorian or French country style largely by using certain
architectural patterns that define those styles. The same is true of the uml.it is made simpler by
the presence of four common mechanisms that apply consistently throughout the language.

1. Specifications.

2. Adornments.

3. Common divisions.

4. Extensibility mechanisms.

SPECIFICATIONS:

The UML is more than just a graphical language. Rather, behind every part of its
graphical notation there is a specification that provides a textual statement of the syntax and
semantics of that building block.

ADORNMENTS:

Most elements in the UML have a unique and direct graphical notation that provides a
visual representation of the most important aspects of the element.

For example, shows a class, adorned to indicate that it is an abstract class with two public, one
protected, and one private operation.

Adornments

SOFTWARE LAB 2 Page 16


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Transaction

execute()
rollback()
priority()
timestamp()

COMMON DIVISIONS:

In modeling object-oriented systems, the world often gets divided in at least a couple of
ways. First there is the division of class and object.

Class and Objects

jan:Custome
r

customer
name
address :customer
phone

Elyse

SOFTWARE LAB 2 Page 17


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

In the figure, there is one class, named customer, together with three objects: Jan, customer, and
Elyse.

In the second, there is the separation of interface and implementation. An interface declares a
contract, and an implementation represents one concrete realization of that contract.

Interfaces and Implementations

IUnknown spellingwi
zard.dll

Ispelling

In the figure, there is one component named spellingwizard.dll that implements two interfaces,
unknown and impelling.

EXTENSIBILITY MECHANISMS:

The UML provides a standard language for writing software blueprints, but it is not possible
for one closed language to ever be sufficient to express all possible nuances of all models across
all domains across all time. The UML extensibility mechanisms include:

 Stereotypes
 Tagged values
 Constraints

SOFTWARE LAB 2 Page 18


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

A Stereotype extends the vocabulary of the UML, allowing you to create new kinds of building
blocks that are derived from existing ones but that are specific to your problem.

A Tagged value extends the properties of a UML building block, allowing you to create new
information in that elements specification.

A Constraint extends the semantics of a UML building block, allowing you to add new rules or
modify existing ones.

Extensibility Mechanisms

exception overflow

EventQueue{version=3.2 author=egb}

add()
remove()
flush()

EXPNO: 2 DATE:25-07-12

ATM SYSTEM

SOFTWARE LAB 2 Page 19


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

AIM:

To design all the UML diagrams and generate the code for ATM System.

DESCRIPTION:

The software to the designed will control a simulated automated teller machine(ATM)
having a magnetic stripe reader for reading an ATM card, a customer console for interaction with
the customer, a slot for depositing envelops a dispenser for cash, a printer for printing customer
receipts and key operated switch to allow an operator to start or stop the machine. The ATM will
communicate with the banks computer over an appropriate communication link.

The ATM will service one customer at a time. a customer will be required to insert an
ATM card and enter personal identification number, both of which will sent to the bank for
validation as part of each transaction. The customer will able to perform one or more transaction.
The card will be retained in the machine until customer indicates that he/she desires to further
transactions, at which point it will be returned except as noted below:

The ATM must able to provide following services to the customer:

1. A customer must be able to make cash with drawn from any suitable account linked to the
card, in multiples of 500.Approval must be obtained from the bank before cash is
dispensed

2. The customer must be able to make a deposit to any account linked to the card consisting
of cash and checks in an envelope. Approval must be obtained from the bank before
physically accepting the envelope.

3. A customer must be able to make a transfer of money between any two account linked to
the card.

4. A customer must be able to make balance inquiry of any account linked to the card.

SOFTWARE LAB 2 Page 20


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

A customer must be able to abort a transaction in progress by pressing the cancel key
instead of responding to a request from machine.

The ATM will communicate each transaction to the bank and obtain verification
that it was allowed by the bank.ordinally a transaction will be considered complete by the
bank once it has been approved. In the case of deposit, a second message will be sent to
the bank indicating that the customer has deposited the envelope.

If the bank determines that the customer pin is invalid. The customer will be
required to reenter the pin before a transaction can proceed. If the customer is unable to
enter successfully enter pin after three tries, the card will be permanently retained by the
machine and customer will have to contact the bank to get it back.

If transaction fails for any reason other than invalid PIN, the ATM will display an
explanation of problem, and will then ask the customer whether he/she wants to do.

The ATM will provide the customer with a printed receipt for each successful
transaction, showing the date, time, machine location, type of transaction, accounts of the
affected account.

The ATM will have a key operated switch that will allow an operation to start and
stop the servicing of customer. After turning the switch to the “ON” position. The
operation will be required to verify and enter the total cash on hand. The machine can
only be turned off when it is not servicing a customer. When the switch is moved to the
“OFF” position, the machine will shut down, so that the operator may remove deposit
envelops and reload the machine with cash, blank-receipt etc…,

The ATM will also maintain an interval log of transactions to facilitate resolving
ambiguities arising from hardware failure in the middle of a transaction. Entries will be
made in the log when the ATM is started up and shutdown for each message sent to the
bank for the dispensing of cash and for the receiving of a envelope, log entries may
contain card numbers and dollar amounts, but for security will never contain a PIN.

SOFTWARE LAB 2 Page 21


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

ATM SYSTEM UML DIAGRAMS

CLASS DIAGRAM:

Cardholder
System1
aname : String
ano : String bname : String
pinno : String atmarea : String
telno : Integer
emailid : String Menuoption()
+theCardholder +theSystem1 Provideaccountdetails()
Insertcard() SuccessTransaction()
Selecttransactiontype() Update()
Performtransaction() Savingorcurrentaccount()
Display() Validityofcard()
Enterpin() Verifypin()
Exit() System()
Cardholder()

Database
accountno : Integer
accountname : String
pinno : Integer
balance : Integer

Details()
Database()

SOFTWARE LAB 2 Page 22


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

USECASE DIAGRAM:

Insertcard

Enterpin

Menuoption

Selecttransactiontype
Failure Security1

Savingorcurrentaccount

Validityofcard BankManager

cardholder System1
Performtransaction

SOFTWARE LAB 2 Page 23


Verifypin

Provideaccountdetails
SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

ACTIVITY DIAGRAM:

Insertatmcard

Enterpin

valid
Exitfromsy no
stem yes

Selectaccounttype

Performtransaction

Getdetails

SOFTWARE LAB 2 Page 24


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SEQUENCE DIAGRAM:

c : Cardholder s : System1 d : Database

Insertcard( )

Validityofcard()

Enterpin( )

Verifypin()

Menuoption( )

Selecttransactiontype( )

Savingorcurrentaccount( )

Performtransaction( )

Provideaccountdetails( )

SuccessTransaction( )

Update()

Exit( )

SOFTWARE LAB 2 Page 25


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COLLABORATION DIAGRAM:

5: Menuoption( )
7: Savingorcurrentaccount( )
9: Provideaccountdetails( )
10: SuccessTransaction( )
c : Cardholder s : System1

1: Insertcard( )
3: Enterpin( )
6: Selecttransactiontype( )
8: Performtransaction( )
12: Exit( ) 2: Validityofcard()
4: Verifypin()
11: Update()

d : Database

SOFTWARE LAB 2 Page 26


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COMPONENT DIAGRAM:

Cardholder
Database

System1

SOFTWARE LAB 2 Page 27


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

DEPLOYMENT DIAGRAM:

Server

ATMsystem1 ATMsystem2 ATMsystem3

Printer2 Printer3
Printer1

SOFTWARE LAB 2 Page 28


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SOFTWARE LAB 2 Page 29


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Result:

Thus the ATM system is modeled successfully using UML.

EXPNO: 3 DATE:08-8-12

LIBRARY MANAGEMENT SYSTEM

AIM:

To model Library management system using unified modeling language.

SPECIFICATIONS:

This library management system software is a unique product. It is capable of handling


books, periodicals and attachments like CD-ROMs, floppies, cassettes, films, drawing etc… with
equal case and efficiency.

This is a window based library management system, utilizing the latest advancements in
the information technology to provide and improve library services.

FEATURES:

FOR MEMBERS:

1. Facility for search


2. Books based on accession number, name, key topics, periodicity, date of publication
3. Attachments based on accession number, parent accession number, topic and type
4. Facility for viewing ABSTRACTS.
5. Facility for reservation books, periodicals and attachments

SOFTWARE LAB 2 Page 30


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

FOR LIBRARY STAFF:


1. Automatic installation
2. Simple and intuitive GUI for performing all functions.
3. Short-cut keys, points and click operations.
4. Online hard copy logging of critical transactions to ensure data security.
5. Special batch mode functions for handling book issues, returns, and renewals.
6. Security features like access control using passwords and user roles.
7. Automatic calculation of late fee.
8. Template editing facilitates for handling multiple cataloging.

SOFTWARE LAB 2 Page 31


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

LIBRARY MANAGEMENT SYSTEMS UML DIAGRAMS

CLASS DIAGRAM:

Library_System
Librarian username : String
name : String password : String
lib_id : String
lib_password : String +theLibrary_System numberofbooks()
+theLibrarian booksissued()
insertion() update()
1..* 1..*
deletion() checkreport()
update() search()
latefeecalculation() studentinfo()
Librarian() Library_System()

+theLibrary_System1..*
1..*
+theLibrary_System
1
+theLibraryDatabase
0..*+theMember
LibraryDatabase Member
isbn_num : String m_id : String
author_name : String mr_name : String
pages : int m_password : String
book_name : String
m_name : String booksowned()
m_password : String reservebooks()
m_id : String search()
bookreturned()
bookdetails() changepassword()
commit() bookdetails()
rollback() Member()
memberdetails()
LibraryDatabase()

SOFTWARE LAB 2 Page 32


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

USECASE DIAGRAM:

issueofbooks

returnbooks
booksowned

librarian
add&edittheinformationofboo
ks
booksavailable
member
librarydatabas
e
calculationoflatefee
booksreturn/renewaldate

printingservice
reservebooks

checkreportofissuedbook
search

booknames isbn author

SOFTWARE LAB 2 Page 33


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SEQUENCE DIAGRAM:

SOFTWARE LAB 2 Page 34


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

m : Member ls : ld :
Library_System LibraryDatabase

1: login_id
2: validate login_id

3: enter password 4: validatepassword


5: select operations

6: bookissue

7: bookdetails

8: authorname

9: search( )
10: selectbook
11: bookselected

12: booksowned( )

13: update( )

14: commit( )

SOFTWARE LAB 2 Page 35


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COLLABORATION DIAGRAM:

9: search( )
1: login_id 13: update( )
3: enter password
6: bookissue
8: authorname
11: bookselected
m : Member ls : Library_System

5: select operations
7: bookdetails
10: selectbook
12: booksowned( ) 2: validate login_id
4: validatepassword
14: commit( )

ld : LibraryDatabase

SOFTWARE LAB 2 Page 36


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

ACTIVITY DIAGRAM:

M ember Librarian

username verify
username

input valid invalid


password

verify
password

select valid invalid


operations

bookissue

inputnameof
book/ISBN/authorname

searchbookby name of
book/ISBN/authorname

nobook found
bookfound
select book display books
matched

receivebook updatebook
information

COMPONENT DIAGRAM:

SOFTWARE LAB 2 Page 37


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Librarian Library_system

Librarydataba Member
se

SOFTWARE LAB 2 Page 38


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

DEPLOYMENT DIAGRAM:

Library server
Library database

client1 client2 client3 client4

SOFTWARE LAB 2 Page 39


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

RESULT:

Thus the library management system is modeled successfully using UML.

EXPNO: 4 DATE:29-8-12

SOFTWARE LAB 2 Page 40


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

ONLINE RESERVATION SYSTEM

AIM:

To design all the UML diagrams for ONLINE RESERVATION SYSTEM.

DESCRIPTION:

Railway reservation system is a system used for booking tickets over internet. Any
customer can book tickets for different trains. Customer can book a ticket only if the tickets are
available. Customer searches for the availability of tickets by entering source and destination,
then if the tickets are available he books the tickets by initially filling details like name, login-id
and password in a form. Tickets can be booked in two ways by i-ticket and by e-ticket booking.

In case of i-ticket booking customer can book the tickets online and the tickets are
couriered to particular customer at their address. But in case of e-ticket booking and cancelling
tickets are booked and cancelled online sitting at the home and the customer himself has to take
print of the ticket but in both the cases amounts for the tickets are deducted from customers
account.

For cancellation of ticket the customer has to enter the website again then choose
cancellation option and fill cancellation form and submit. After successful cancellation of the
ticket, the refund is transferred to customer account. And then the customer logout from the
website.

The new system will allow the passenger to check the information about the trains through which
he wants to travel and allows the passenger to reserve ticket if it is available.

1. First, the passenger enters the website the following details name, login-id and password.
2. The system will ask the passenger to choose source and destination.
3. The system will display the list of trains and the number of seats available for passenger.

SOFTWARE LAB 2 Page 41


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

4. Passengers will reserve ticket if the tickets are available otherwise the passengers will
logout from the system.
5. The system will ask the passenger to submit credit card details to collect money.
6. The system shows information to the passenger. i.e., ticket is reserved successfully or not.
7. The system will also allow the passenger to cancel his ticket whenever he desires. Finally
the passengers can logout from the website.

ONLINE RESERVATION SYSTEM UML DIAGRAMS

SOFTWARE LAB 2 Page 42


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

USECASE DIAGRAM (RESERVING A TICKCET):

enter into website

Login

choose source and destination

Display List of trains

Check list of trains

Choose train

passenger
Railwaydatabase
Railwaywebsite
fill the user details

Check number of seats available


Reserve ticket

Creditcard/Debitcard

ticket status

confirmation

logout

USECASE DIAGRAM (CANCELLATION OF TICKET):

SOFTWARE LAB 2 Page 43


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Enter into website

login
Verify passenger details

choose cancellation option railway database


Website
Passenger

Enter reservationID

Update availabilty of seats

display user details

confirm ticket cancellation

Refund money

Logout

CLASS DIAGRAM:

SOFTWARE LAB 2 Page 44


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Passenger1
name : String Railwaysystem
address : String
systemid : Integer
age : Integer
gender : String
checklistoftrains()
mobilenum : Integer
checkavailableseats()
email : String
checkcreditcardinfo()
processstatus()
searchtrain()
showticket()
bookticket()
confirm()
cancelticket()
update()
paymoney()
checkticketstatus()

Database
passengername : String
creditcardnum : String

validityofcard()
updateseats()
updatetraininformation()

SOFTWARE LAB 2 Page 45


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SEQUENCE DIAGRAM (RESERVING A TICKET):

p : Passenger1 d : Railwaysystem d : Database

enterintowebsite
login verifylogindetails

verification success

choose source and destination check available trains

if trains available
display list of trains

choose train

enter number of seats


verify number of seats available
if seats available

fill the user details

enter creditcard number validate creditcard details

validate success

confirm
display ticket

update seats

printticket

logout

SEQUENCE DIAGRAM (CANCELLATION OF TICKET):

SOFTWARE LAB 2 Page 46


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

p : Passenger1 r : Railwaysystem d : Database

enter into website


login verify login details

verification success

choose cancellation option

enter reservation id verify details

if verification success

cancel the ticket

calculate and refund money


update seats
logout

COLLABORATION DIAGRAM (RESERVING A TICKET):

SOFTWARE LAB 2 Page 47


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

1: enterintowebsite
2: login
5: choose source and destination
9: choose train
10: enter number of seats
13: fill the user details
14: enter creditcard number
17: confirm
20: printticket
21: logout
p : Passenger1 d : Railwaysystem

8: display list of trains


18: display ticket 3: verifylogindetails
6: check available trains
11: verify number of seats available
4: verification success 15: validate creditcard details
7: if trains available 19: update seats
12: if seats available
16: validate success

d : Database

COLLABORATION DIAGRAM (CANCELLATION OF TICKET):

SOFTWARE LAB 2 Page 48


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

1: enter into website


2: login
5: choose cancellation option
6: enter reservation id
9: cancel the ticket
12: logout
p : Passenger1 r : Railwaysystem

10: calculate and refund money

3: verify login details


7: verify details
4: verification success
11: update seats
8: if verification success

d : Database

ACTIVITY DIAGRAM (RESERVING A TICKET):

SOFTWARE LAB 2 Page 49


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

passenger railwaysystem database

Enter into
website

choose source check available


and destination trains

Display list of
choose train trains

check number
enter number of of seats
seats

not available
Fill the user
seats available
details

Enter the creditcard validate


number creditcard

failure
success

confirm details
Display ticket
update

Print ticket

ACTIVITY DIAGRAM (CANCELLATION OF TICKET):

SOFTWARE LAB 2 Page 50


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

passenger railwaysystem database

Enter into
railwaywebsite

choose the
cancellation option

enter reenter id
res ervation id

Displayuser
details

verify
us erdetails

confirm ticket succes s


cancellation

calculate and
refund m oney

update seats

logout

COMPONENT DIAGRAM:

SOFTWARE LAB 2 Page 51


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

passean website
ger

database

DEPLOYMENT DIAGRAM:

SOFTWARE LAB 2 Page 52


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

website databas
e

passang passang passang


er1 er2 er3

SOFTWARE LAB 2 Page 53


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

RESULT:

Thus the online reservation system is modeled successfully using UML.

EXPNO: 5 DATE: 26-9-12

SOFTWARE LAB 2 Page 54


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

MULTI- INFORMATION SYSTEM

AIM:

To design all the UML diagrams and generate the code for MIS system.

DESCRIPTION:

The software to be designed will control a simulated Multi-Information system (MIS).It


contains multi information regarding-Mobile numbers address details, places of address,
Transportation facility details.

This MIS will provide services for a user, who have with valid login name and ID.These
secure information’s will send to the MIS DATABSE for validation as a part of each transaction.
The login information will be retained in MIS until user performing operations.

Mobile Number Address Details:

When user click on this information, it asks Mobile Number

Once entered its give following details.

1. Mobile User Name

2. Address with Photo

3. Network operator Provider and Place of location.

Above details will get from concern operator services, from their Databases

Place of Address:

It asks search place of address by Name, Location or Phone Number

If it is Name, enter name of place. If it is location, enter location name, if it is phone


number, enter phone no.It gives full details of place.

SOFTWARE LAB 2 Page 55


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Transportation Details:

In this Transportation details, once you enter Name of the place…it gives road map from
where you want to travel along with it gives transportation details of train, buses and flights
availabilities.

This MIS will provide an excellent way Information details to a clients. It makes user friendly
applications.

ABBREVIATIONS:

MIS-MULTI_INFORMATION SYSTEM

MID-MOBILE INFORMATION DETAILS

PID-PLACE INFORMATION DETAILS

TID-TRANSPORT INFORMATION DETAILS

USECASE DIAGRAM MULTI-INFORMATION SYSTEM:

SOFTWARE LAB 2 Page 56


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Multi Information System

IDEA

Enter into website

MobileDB Airtel
Enter username

Enter password BSNL

user
Select mobile No Detail MIS Website

PlaceDB Google

Select Place for detail MIS DB

APSRTC
Validation process
Know Transportation Details

TransportationDB
EXit TRAIN

Aeroplane

USECASE DIAGRAM FOR MID:

Mobile Information Details

Vodafone

Enter Mobile number MobileoperatorsDB AirteL

User BSNl
Display address details MIS DBS

Exit

USECASE FOR PID:

SOFTWARE LAB 2 Page 57


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

Place Information details

Enter name
Google

Google DB
Display Details
PlaceInformati
onDB
User
D-place,Adress,phone

Exit

USECASE FOR TID:

Transportation Info Sys

Enter Source APSRTC


BUS DB

Enter destination
TrainDB IRCTC

user MIS DB
Display Details

AeroplaneDB
IAIS

D-Bus,Train,Aeroplanes

Exit

SOFTWARE LAB 2 Page 58


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

CLASS DIAGRAM (MIS):

MIS DBE
USer
login name : String contain Mobile user name()
password : Integer contain address()
enter mobile num : Integer comtainNetwork operator()
enter source : String +theUSer +theMIS DBEcontain location details()
enter destina : String contain bus details()
enter place name : String * contain train details()
contain airline details()
select mobile details() Display mobile details()
select place of details() Display place of details()
select Transport details() +theMIS DBEDisplay transport details() 1
1 1

+theMobileNumDet *
+thePlaceOfaddress +theTRansportaion
* *
MobileNumDet TRansportaion
PlaceOfaddress
Details of MAddres() Details of Buses()
Details of places() Details of trains()
Details of airlines()

SOFTWARE LAB 2 Page 59


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SEQUENCE DIAGRAM (MID):

Mobile number address details

m: u : UseR m:.
Mobile...
1: Enter mobile number

2: Disp mobile username

3: Address with photo( )

4: Disp networkoperater( )

5: Disp place of location( )

6: Disp Details

SOFTWARE LAB 2 Page 60


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COLLABORATION DIAGRAM (MID):

Mobile number address details

1: Enter mobile nu...

u : UseR m:.

6: Disp Details2: Disp mobile user...


3: Address with photo( )
4: Disp networkoperater( )
5: Disp place of location( )

m : MobileNumDeT

SOFTWARE LAB 2 Page 61


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COLLABORATION DIAGRAM (PID):

place of address

1: Enter name
u : USEr m : MiS

2: requesting

5: Disp address details witj location3: requesting g : GoogleDB

p : PlaceOfaddress
4: Disp all details

SOFTWARE LAB 2 Page 62


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SEQUENCE DIAGRAM (PID):

place of address

u : USEr m : MiS p: g:
PlaceOf... GoogleDB
1: Enter name

2: requesting

3: requesting

4: Disp all details

5: Disp address details witj location

SOFTWARE LAB 2 Page 63


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COLLABORATION DIAGRAM (TID):

Transportation details

1: Enter source name


2: Enter destination
u : USERS m : MIS b : BUS
DBE
11: Display Details
4: Requesting
3: Requseting
7: Display Details
5: Requesting t : TRain
10: Send details

t : TransportDB
8:Requesting
6: Display details

a : Airlines
9: display details

SOFTWARE LAB 2 Page 64


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

SEQUENCE DIAGRAM (TID):

Transportation Details

u : USERS m : MIS DBE t: b : BUS t : TRain a : Airlines


TransportDB
1: Enter source name

2: Enter destination

3: Requseting

4: Requesting

5: Requesting

6: Requesting

7: Display Details

8: Display details

9: display details

10: Send details

11: Display Details

SOFTWARE LAB 2 Page 65


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

ACTIVITY DIAGRAM (MIS):

USer MIS Website MIS DB Mobile num add Det Place of address TransportationDet

Enter Not valid


loginID&paswrd

Checking
verifiaction
valid

Select
operations

Select mobile
number details Contain
name/add/Noper/placeloc

ENter mobile Contain Mobile


num no details

Display Mobie
INfo details

select place
of address

enter name
Conatin Contain location
place details /address

Display Plae
of address

Select transportation
details

Enter source

Enter
destination Conatins Transport
details

Displays
TRansport details
Conatins details of
Buses/trains/airlines

logout

SOFTWARE LAB 2 Page 66


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

COMPONENT DIAGRAM (MIS):

Mobile number
address details

MIS
user
Server
Place of
address

Transport
details

SOFTWARE LAB 2 Page 67


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

DEPLOYMENT DIAGRAM (MIS):

Mobile
Server

MIS
Server Place of Google
server

User1 user2
Transport server

SOFTWARE LAB 2 Page 68


SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES

RESULT:
Thus the UML Diagrams for Multi-Information System were executed successfully.

SOFTWARE LAB 2 Page 69

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy