Uml Final
Uml Final
Uml Final
OBJECT
ORIENTED
ANALYSIS AND
DESIGN
EXPNO: 1 DATE:11-07-12
AIM:
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.
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.
ClassName Window
Attributes origin
size
Operations()
open()
close()
display()
2. INTERFACE:
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.
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.
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.
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.
Orderform.java
Component
Name
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.
BEHAVIORAL THINGS:
Behavioral things are the dynamic parts of UML models. These are the verbs of a model,
representing behavior over time and space.
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.
2. STATE MACHINE:
3. GROUPING THINGS:
Grouping things are the organizational parts of UML models. These are the boxes into
which a model can be decomposed.
PACKAGE:
Graphically, a package is rendered as a tabbed folder, usually including its name, and
sometimes, its contents.
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.
NOTE:
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:
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.
Circle
Point
Move(p:point)()
GENERALIZATION:
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.
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.
REALIZATION:
DIAGRAMS:
1. Class diagram.
2. Object diagram.
4. Sequence diagram.
5. Collaboration 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.
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:
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:
Objects
Links
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 cases
Actors
Dependency, Generalization and Association relationships
INTERACTION DIAGRAMS:
Contents:
Objects
Links
Messages
1. Sequence Diagram.
2. Collaboration Diagram.
4. SEQUENCE DIAGRAM:
5. COLLABORATION 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.
Contents:
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:
8. COMPONENT DIAGRAM:
Definition:
Contents:
Components
Interfaces
Dependency, generalization, association, and realization relationships
9. DEPLOYMENT DIAGRAM:
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:
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.
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
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
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.
jan:Custome
r
customer
name
address :customer
phone
Elyse
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.
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
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
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:
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.
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.
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()
USECASE DIAGRAM:
Insertcard
Enterpin
Menuoption
Selecttransactiontype
Failure Security1
Savingorcurrentaccount
Validityofcard BankManager
cardholder System1
Performtransaction
Provideaccountdetails
SREENIVASA INSTITUTE OF TECHNOLOGY & MANAGEMENT STUDIES
ACTIVITY DIAGRAM:
Insertatmcard
Enterpin
valid
Exitfromsy no
stem yes
Selectaccounttype
Performtransaction
Getdetails
SEQUENCE DIAGRAM:
Insertcard( )
Validityofcard()
Enterpin( )
Verifypin()
Menuoption( )
Selecttransactiontype( )
Savingorcurrentaccount( )
Performtransaction( )
Provideaccountdetails( )
SuccessTransaction( )
Update()
Exit( )
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
COMPONENT DIAGRAM:
Cardholder
Database
System1
DEPLOYMENT DIAGRAM:
Server
Printer2 Printer3
Printer1
Result:
EXPNO: 3 DATE:08-8-12
AIM:
SPECIFICATIONS:
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:
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()
USECASE DIAGRAM:
issueofbooks
returnbooks
booksowned
librarian
add&edittheinformationofboo
ks
booksavailable
member
librarydatabas
e
calculationoflatefee
booksreturn/renewaldate
printingservice
reservebooks
checkreportofissuedbook
search
SEQUENCE DIAGRAM:
m : Member ls : ld :
Library_System LibraryDatabase
1: login_id
2: validate login_id
6: bookissue
7: bookdetails
8: authorname
9: search( )
10: selectbook
11: bookselected
12: booksowned( )
13: update( )
14: commit( )
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
ACTIVITY DIAGRAM:
M ember Librarian
username verify
username
verify
password
bookissue
inputnameof
book/ISBN/authorname
searchbookby name of
book/ISBN/authorname
nobook found
bookfound
select book display books
matched
receivebook updatebook
information
COMPONENT DIAGRAM:
Librarian Library_system
Librarydataba Member
se
DEPLOYMENT DIAGRAM:
Library server
Library database
RESULT:
EXPNO: 4 DATE:29-8-12
AIM:
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.
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.
Login
Choose train
passenger
Railwaydatabase
Railwaywebsite
fill the user details
Creditcard/Debitcard
ticket status
confirmation
logout
login
Verify passenger details
Enter reservationID
Refund money
Logout
CLASS DIAGRAM:
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()
enterintowebsite
login verifylogindetails
verification success
if trains available
display list of trains
choose train
validate success
confirm
display ticket
update seats
printticket
logout
verification success
if verification success
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
d : Database
d : Database
Enter into
website
Display list of
choose train trains
check number
enter number of of seats
seats
not available
Fill the user
seats available
details
failure
success
confirm details
Display ticket
update
Print ticket
Enter into
railwaywebsite
choose the
cancellation option
enter reenter id
res ervation id
Displayuser
details
verify
us erdetails
calculate and
refund m oney
update seats
logout
COMPONENT DIAGRAM:
passean website
ger
database
DEPLOYMENT DIAGRAM:
website databas
e
RESULT:
AIM:
To design all the UML diagrams and generate the code for MIS system.
DESCRIPTION:
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.
Above details will get from concern operator services, from their Databases
Place of Address:
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
IDEA
MobileDB Airtel
Enter username
user
Select mobile No Detail MIS Website
PlaceDB Google
APSRTC
Validation process
Know Transportation Details
TransportationDB
EXit TRAIN
Aeroplane
Vodafone
User BSNl
Display address details MIS DBS
Exit
Enter name
Google
Google DB
Display Details
PlaceInformati
onDB
User
D-place,Adress,phone
Exit
Enter destination
TrainDB IRCTC
user MIS DB
Display Details
AeroplaneDB
IAIS
D-Bus,Train,Aeroplanes
Exit
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()
m: u : UseR m:.
Mobile...
1: Enter mobile number
4: Disp networkoperater( )
6: Disp Details
u : UseR m:.
m : MobileNumDeT
place of address
1: Enter name
u : USEr m : MiS
2: requesting
p : PlaceOfaddress
4: Disp all details
place of address
u : USEr m : MiS p: g:
PlaceOf... GoogleDB
1: Enter name
2: requesting
3: requesting
Transportation details
t : TransportDB
8:Requesting
6: Display details
a : Airlines
9: display details
Transportation Details
2: Enter destination
3: Requseting
4: Requesting
5: Requesting
6: Requesting
7: Display Details
8: Display details
9: display details
USer MIS Website MIS DB Mobile num add Det Place of address TransportationDet
Checking
verifiaction
valid
Select
operations
Select mobile
number details Contain
name/add/Noper/placeloc
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
Mobile number
address details
MIS
user
Server
Place of
address
Transport
details
Mobile
Server
MIS
Server Place of Google
server
User1 user2
Transport server
RESULT:
Thus the UML Diagrams for Multi-Information System were executed successfully.