Professional Documents
Culture Documents
EXPERIMENT NO -1
AIM: - Introduction to UML
UML is a standard language for specifying, visualizing, constructing,
and documenting the artifacts of software systems.UML was created by Object Management
Group (OMG) and UML 1.0 specification draft was proposed to the OMG in January 1997.
OMG is continuously putting effort to make a truly industry standard.
UML is different from the other common programming languages like C++, Java,
COBOL etc.
A conceptual model can be defined as a model which is made of concepts and their
relationships.
A conceptual model is the first step before drawing a UML diagram. It helps to
understand the entities in the real world and how they interact with each other.
As UML describes the real time systems it is very important to make a conceptual model and
then proceed gradually. Conceptual model of UML can be mastered by learning the following
three major elements:
Things
Relationships
Diagrams
(1) Things:
Things are the most important building blocks of UML. Things can be:
Structural
Behavioral
Grouping
Annotational
Structural things:
The Structural things define the static part of the model. They represent physical and
conceptual elements. Following are the brief descriptions of the structural things.
Class:
Class represents set of objects having similar responsibilities.
Interface:
Interface defines a set of operations which specify the responsibility of a class.
Collaboration:
Collaboration defines interaction between elements.
Use case:
Use case represents a set of actions performed by a system for a specific goal.
2
Component:
Component describes physical part of a system.
Behavioral things:
A behavioral thing consists of the dynamic parts of UML models. Following are the
behavioral things:
Interaction:
Interaction is defined as a behavior that consists of a group of messages exchanged among
elements to accomplish a specific task.
State machine:
State machine is useful when the state of an object in its life cycle is important. It defines the
sequence of states an object goes through in response to events. Events are external factors
responsible for state change.
Grouping things:
Grouping things can be defined as a mechanism to group elements of a UML model
together. There is only one grouping thing available:
Package:
Package is the only one grouping thing available for gathering structural and behavioral
things.
Annotational things:
Annotational things can be defined as a mechanism to capture remarks, descriptions,
and comments of UML model elements. Note is the only one Annotational thing available.
Note:
A note is used to render comments, constraints etc of an UML element.
(2) Relationship:
Relationship is another most important building block of UML. It shows how
elements are associated with each other and this association describes the functionality of an
application.
There are four kinds of relationships available.
Dependency:
Dependency is a relationship between two things in which change in one element also affects
the other one.
Association:
Association is basically a set of links that connects elements of an UML model. It also
describes how many objects are taking part in that relationship.
Generalization:
Generalization can be defined as a relationship which connects a specialized element with a
generalized element. It basically describes inheritance relationship in the world of objects.
Realization:
Realization can be defined as a relationship in which two elements are connected. One
element describes some responsibility which is not implemented and the other one
implements them. This relationship exists in case of interfaces.
Structural Diagrams
Behavioral Diagrams
Structural Diagrams:
The structural diagrams represent the static aspect of the system. These static aspects
represent those parts of a diagram which forms the main structure and therefore stable.
These static parts are represents by classes, interfaces, objects, components and nodes. The
four structural diagrams are:
Class diagram
Object diagram
Component diagram
Deployment diagram
Class Diagram:
Class diagrams are the most common diagrams used in UML. Class diagram consists of
classes, interfaces, associations and collaboration.
Class diagrams basically represent the object oriented view of a system which is static in
nature.Active class is used in a class diagram to represent the concurrency of the
system.Class diagram represents the object orientation of a system. So it is generally used for
5
development purpose. This is the most widely used diagram at the time of system
construction.
Object Diagram:
Object diagrams can be described as an instance of class diagram. So these diagrams are
more close to real life scenarios where we implement a system.Object diagrams are a set of
objects and their relationships just like class diagrams and also represent the static view of the
system.
The usage of object diagrams is similar to class diagrams but they are used to build prototype
of a system from practical perspective.
Component Diagram:
Component diagrams represent a set of components and their relationships. These
components consist of classes, interfaces or collaborations. So Component diagrams
represent the implementation view of a system. During design phase software artifacts
(classes, interfaces etc) of a system are arranged in different groups depending upon their
relationship. Now these groups are known as components.
Finally, component diagrams are used to visualize the implementation.
Deployment Diagram:
Deployment diagrams are a set of nodes and their relationships. These nodes are physical
entities where the components are deployed.
Deployment diagrams are used for visualizing deployment view of a system. This is generally
used by the deployment team.
Behavioral Diagrams:
Any system can have two aspects, static and dynamic. So a model is considered as
complete when both the aspects are covered fully.Behavioral diagrams basically capture the
dynamic aspect of a system. Dynamic aspect can be further described as the changing/moving
parts of a system.UML has the following five types of behavioral diagrams:
Sequence diagram
Collaboration diagram
Statechart diagram
Activity diagram
Sequence Diagram:
A sequence diagram is an interaction diagram. From the name it is clear that the diagram
deals with some sequences, which are the sequence of messages flowing from one object to
another.Interaction among the components of a system is very important from
implementation and execution perspective.
So Sequence diagram is used to visualize the sequence of calls in a system to perform a
specific functionality.
Collaboration Diagram:
Collaboration diagram is another form of interaction diagram. It represents the structural
organization of a system and the messages sent/received. Structural organization consists of
objects and links.
The purpose of collaboration diagram is similar to sequence diagram. But the specific
purpose of collaboration diagram is to visualize the organization of objects and their
interaction.
Statechart Diagram:
Any real time system is expected to be reacted by some kind of internal/external events.
These events are responsible for state change of the system.Statechart diagram is used to
represent the event driven state change of a system. It basically describes the state change of
a class, interface etc.
State chart diagram is used to visualize the reaction of a system by internal/external factors.
Activity Diagram:
Activity diagram describes the flow of control in a system. So it consists of activities and
links. The flow can be sequential, concurrent or branched.Activities are nothing but the
functions of a system. Numbers of activity diagrams are prepared to capture the entire flow in
a system.
Activity diagrams are used to visualize the flow of controls in a system. This is prepared to
have an idea of how the system will work when executed.
EXPERIMENT NO -2
AIM: - DRAW A USE CASE DIAGRAM OF ATM MACHINE
SYSTEM.
The Use Case Diagram of Banking System include three actors which are as follows :1. User
2. ATM Machine
3. Bank
User: - There are various types of users like corporate user etc. User is the one who
wants to use ATM machine for withdrawing his cash from his account. He should have his
ATM card of any bank. Before using ATM machine he should know the procedure of ATM
machine and his bank account deposits.
PROCESSES: Insert Card: - In this the customer insert his ATM card i.e. put inside his card into ATM
machine for some seconds and then take outside.
Verify Card: - This will check the card. Basically this will check that whether the ATM
card is valid or not.
8
Enter Pin: - After the card validation the ATM machine displays a question for entering
the ATM card pin which is the confidential for the user, then a request is sent to the bank
through ATM machine.
Verify Pin: - In this the entered pin is verified or checked by sending acknowledgement
to the ATM machine by the bank.
Enter Amount: - Now all the validations are done and user can enter the amount which
he wants to debit from his Bank account.
Check Balance: - After entering specific amount the ATM machine sends request to
the bank to check the current balance of the users account or entered amount.
Receive Entered Amount: - After checking the balance the ATM machine receives
the amount entered by the user from the bank.
Insert Card
Verify Card
Enter Pin
Pin Verification
Entered Amount
Enter Amount
ATM
User
Check Balance
Amount Withdrawn
Withdraw Money
Bank
Card Verified
Recieve Mini-Statement
<<include>>
Pin Verified
Transaction
<<include>>
Current Account
Balance Enquiry
Balance Checked
EXPERIMENT NO -3
AIM: - DRAW A USE CASE DIAGRAM OF ONLINE SHOPPING CART
SYSTEM.
The Use Case Diagram of Shopping Cart System includes three actors which are as follows:1. Customer
2. Shopping Cart
3. Admin
Admin: - He can manage the all products, bills and customers info.
Shopping Cart: -In this the customer can order any product.
PROCESSES: Register: - For buying any product each customer should first register himself to the
Shopping Cart.
Add User Info: -After registration to the shopping cart the users info is added to the
admin panel.
Sign In: - After registration customer sign in to shopping cart for buy any product or to
see any product.
Authentication: - Admin verify the customers detail registered to the shopping cart.
View Products: - After authentication customer can see all the products.
Buy Product: - Customer buys products from the shopping cart.
Manage Products: - Admin manage all products that is added to the shopping cart.
This include further two more processes In Stock and Out Of Stock products.
Payment: - After buy any product, the payment is made to the shopping cart by the
customer. Payment process extend to the By credit card or By Cash on delivery process
that is payment can be done either by credit card or by cash.
11
Manage Products
Register
<<include>>
Sign In
In Stock <<include>>
Out of Stock
View Products
Buy Product
Authentication
Registered
Customer
Admin
Deliver Product
Payment
<<extend>>Payment Recieved
<<extend>>
Shopping Cart
By Credit Card
By Cash on Delivery
EXPERIMENT NO-4
AIM: - DRAW A CLASS DIAGRAM OF ATM SYSYTEM.
Classes used in this are:
User: Here are various types of users like corporate user etc. User is the one who wants
to use ATM machine for withdrawing his cash from his account. He should have his ATM
12
card of any bank. Before using ATM machine he should know the procedure of using
ATM machine and his bank account deposits.
Address
Phone no
14
entered amount
enter amount
user
Atm
+name
+adrees
+phone_no
+account no
enter card
+insert card()
+withdraw money()
+check balance()
enter pin
pin verification
+address
+phone_no
+wiithdraw money()
+check balance()
bank
+name
+address
+phone number
card verify
balance checked
recieve enter amount
amount withdrawn
balance enquiry
employee
+name
+adrees
+phone number
+work()
manager
cashier
+name
+phone_no
+address
+name
+address
+phone_no
+manage work()
+work()
15
+verify account()
+verify user()
+check balance()
EXPERIMENT NO-5
AIM: - DRAW A CLASS DIAGRAM OF ONLINE SHOPPING CART
SYSYTEM.
Classes used in this are:
Customer: - Customer is who visit the website and view the products and buy any
product which he wants.
Admin: - Admin manage all the products in website that is delete or add products to
the website.
Shipment: - This includes the delivery of product to the customer and confirmation
of the payment of the product .
Payment: - This includes the mode of the payment done by the customer either by
credit card or by debit card.
Add_products
Delete_products
17
18
Admin
+manage_products()
+add_products()
+delete_products()
Customer
+Cust_name
+Cust_address
+Cust_phoneno
Website
+buy_products
+visit
+update_products()
+recieve_orders()
+payment()
+shipment()
+browse_website()
+give_order()
+make_payment()
+recieve_product()
+order_no
+order_details
+order_date
+place_order()
+check_order_detail()
+add_to_shipping_cart()
+account_no
+bank_name
+payment
+by_credit_card()
+by_debit_card()
+by_cash()
+give_payment()
Shipment
Order
Payment
+cust_address
+order_no
+cust_phoneno
+confirm_payment()
+confirm_order()
Cash On Delivery
Credit Card
+credit_card_no
+bank_name
+account_no
+make_payment()
Debit Card
+debit_card_no
+bank_name
+account_no
+make_payment()
19
+order_no
+shipment_no
+delivered()
+not_delivered()
EXPERIMENT NO-6
AIM: - DRAW A SEQUENCE DIAGRAM OF ATM MACHINE.
The sequence diagram of ATM machine include three objects which are as follows:
1. User
2. ATM
3. Bank
20
ATM
User
Bank
1 : Enter Card()
2 : Verify Card()
3 : Card Verified()
4 : CArd Verified()
5 : Enter Pin()
6 : Pin Verification()
7 : Pin Verified()
8 : Pin Verified()
9 : Withdraw Money()
10 : Enter Amount()
11 : Amount Entered()
12 : Gave Amount()
13 : Recieve Amount()
14 : Balance Enquiry()
15 : Check Balance()
16 : Balance Checked()
EXPERIMENT NO -7
21
22
Shopping Cart
Customer
1 : Register()
Admin
2 : Add Customer Info()
3 : Registered()
4 : Registered()
5 : Sign In()
6 : Authentication()
7 : Authentication Done()
8 : Manage Products()
9 : View Products()
10 : Buy Product()
11 : Payment()
12 : By Credit Card()
13 : By Cash on Delivery()
14 : Check Payment()
15 : Payment Recieved()
16 : Payment Recieved()
17 : Deliver Product()
23
EXPERIMENT NO-8
AIM: -DRAW A COLLABORATION DIAGRAM OF ATM MACHINE
SYSTEM
The collaboration diagram of ATM machine include three objects which are as follows:
1. User
2. ATM
3. Bank
There is Link build up between User and ATM, ATM and Bank.
Forward Stimulus Used in this are:
Insert Card
Verify Card
Enter Pin
Verify Pin
Withdraw Money
Enter Amount
Check Entered Amount
Balance Enquiry
Check Balance
Reverse Stimulus Used in this are:
Card Verified
Pin Verified
Gave Money
Receive Money
Generate Slip
Receive Mini Statement
24
2 : Verify Card()
1 : Insert Card()
User
ATM
5 : Enter pin()
9 : Withdraw Money()
6 : Verify Pin()
11 : Check Entered Amount()
10 : Enter Amount()
14 : Balance Enquiry()
15 : Check Balance()
4 : Card Verified()
3 : Card Verified()
8 : Pin Verified()
7 : Pin Verified()
13 : Recieve Money()
12 : Gave Money()
16 : Generate Slip()
25
Bank
EXPERIMENT NO-9
AIM: - DRAW A COLLABORATION DIAGRAM OF ONLINE
SHOPPING CART SYSTEM
The collaboration diagram of Online Shopping Cart System includes three objects which are
as follows:
1. Customer
2. Shopping Cart
3. Admin
There is Link build up between Customer and Shopping Cart, Shopping Cart and Admin.
Forward Stimulus Used in this are:
Register
Add customer Info
Sign In
Authentication
Manage products
View Product
Buy product
Payment
By Credit Card
By Cash on Delivery
Check Payment
Reverse Stimulus Used in this are:
Registered
Authentication Done
Payment received
Deliver Product
26
1 : Register()
Customer
5 : Sign In()
Shopping Cart
9 : View Products()
Admin
2 : Add Customer info()
6 : Authentication()
10 : Buy product()
8 : Manage Products()
11 : Payment()
12 : By Credit Card()
14 : Check Payment()
13 : By Cash on Delivery()
4 : Registered()
3 : Registered()
16 : Payment Recieved()
7 : Authentication Done()
17 : Deliver Product()
15 : Payment Recieved()
27
EXPERIMENT NO-10
AIM: - DRAW AN ACTIVITY DIAGRAM OF ONLINE SHOPPING
CART SYSTEM
The activity diagram of Online Shopping Cart System includes three entities which are as
follows:
1. Customer
2. Shopping Cart
3. Admin
Customer entity includes the initial state which is Visit site activity.
Final state is collect cash activity.
Activities included in this are:
Initial state activity Visit Site & Register activity is done by Customer entity.
Registration activity is done by Shopping cart entity.
Registration successful activity done by Admin entity.
Login
Check User
Verify Account
Verified
View Products
Buy Products
Then If the product is in stock then do the payment otherwise the product is out of stock.
By credit card does online payment otherwise choose By cash to do payment on delivery.
Deliver Product
Collect Cash is the final activity done by shopping cart.
28
Customer
Shopping Cart
Visit Site
Registration
Admin
Registration Sucessfull
Register
Login
Check User
View Products
Manage products
Verified
Buy Products
If out of stock
Payment
If in Stock
By Credit Card
Online Payment
By Cash
Cash on Delivery
Verify account
Collect Cash
Deliver Product
29
EXPERIMENT NO-11
AIM: -DRAW AN ACTIVITY DIAGRAM OF ATM MACHINE SYSTEM
The activity diagram of ATM machine include three entities which are as follows:
1. User
2. ATM
3. Bank
Activities included in this are:
Insert Card
Validate Atm Card, If the ATM Card is valid then enter pin activity will perform otherwise
Return ATM Card.
Authentication
Enter Pin
Validate Pin, If the Pin is valid then enter amount activity will perform otherwise Return
Card.
Pin Authentication
Enter Amount
Check Balance, If the amount is less than balance then this perform two parallel activity take
money from slot and update account.
Take Money from Slot
Update Account
Show New Balance
Eject Card
30
31
EXPERIMENT NO-12
AIM: -DRAW AN STATE CHART DIAGRAM OF ATM MACHINE
SYSTEM
The state chart diagram of ATM machine include five entities which are as follows:
1. Reading Card
2. Reading Pin
3. Choosing Pin
4. Performing Transaction
5. Ejecting Card
Activities included in this are:
Reading Card
Validate Atm Card, If the ATM Card is valid then enter pin activity will perform otherwise
Return ATM Card.
Reading Pin
Validate Pin, If the Pin is valid then enter amount activity will perform otherwise Return
Card.
Performing Transaction
Check Balance, If the amount is less than balance then this perform two parallel activity take
money from slot and update account.
Take Money from Slot
Update Account
Ejecting Card
32
EXPERIMENT NO-13
AIM: -DRAW AN COMPONENT DIAGRAM OF ATM MACHINE
SYSTEM
A component diagram in the Unified Modeling Language, depicts how components are wired
together to form larger components and or software systems. Components diagrams can be
used to illustrate the structure of arbitrarily complex systems.
The component diagram of ATM machine include three entities which are as follows:
1. Bank
2. User Interface
3. Atm User Interface
Activities included in this are:
Insert Card
Validate Atm Card, If the ATM Card is valid then enter pin activity will perform otherwise
Return ATM Card.
Authentication
Enter Pin
Validate Pin, If the Pin is valid then enter amount activity will perform otherwise Return
Card.
Pin Authentication
Enter Amount
Check Balance, If the amount is less than balance then this perform two parallel activity take
money from slot and update account.
Take Money from Slot
Update Account
Show New Balance
Eject Card
34
Bank.java
Atm User
Interface.java
communicates with
Atm
Control.java
35
EXPERIMENT NO-14
AIM: -DRAW AN DEPLOYMENT DIAGRAM OF ATM MACHINE
SYSTEM
A deployment diagram in the Unified Modeling Language serves to model the physical
deployment of artifacts on deployment targets. Deployment diagrams show the allocation of
Artifacts to Nodes according to the Deployments defined between them. Deployment of an
artifact to a node is indicated by placing the artifact inside the node.
The deployment diagram of ATM machine include three entities which are as follows:
1. Atm Client
2. Atm Server
3. Data BaseServer
Activities included in this are:
Insert Card
Validate Atm Card, If the ATM Card is valid then enter pin activity will perform otherwise
Return ATM Card.
Authentication
Enter Pin
Validate Pin, If the Pin is valid then enter amount activity will perform otherwise Return
Card.
Pin Authentication
Enter Amount
Check Balance, If the amount is less than balance then this perform two parallel activity take
money from slot and update account.
Take Money from Slot
Update Account
Show New Balance
Eject Card
36
Atm Client
<<Tcp/IP>>
Atm Server
Data
Baseserver
37