Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 59

APPLICATION USING USE CASE - BANKING SYSTEM

USE CASE DIAGRAM

Deposit

Transfer Withdraw
Officer

Customer
APPLICATION USING SEQUENCE DIAGRAM –
INVENTORY SYSTEM
USE CASE DIAGRAM

Purchase of raw materials

<<extends>>

Administrator

<<extends>>

Returns Sale of finished goods


SEQUENCE DIAGRAM
Purchase:

Supplier : Fact_manager : System Screen : Mat_DB :


supply User Screen materials_DB

1: requests details
2: refers to details

3: details given
4: details displayed

5: checks for available materials

if materials needed
6: calculates materials to be purchased

7: place order

8: requests confirmation
9: confirmation message

10: materials supplied

11: request receipt

12: receipt given


13: message for updation

14: update details in purchase records

15: success for updation


16: message displayed
Sale:

Buyer : Fact_manager : System Screen : finished_goods_DB


purchaser User Screen : goods_DB

1: message for order placed(with acknowledment receipt)

2: validates order

3: requests goods details


4: searches for details
5: details given
6: details displayed

7: checks for available goods

8: calculates goods to be delivered

9: goods delivered

10: acknowledgement received

11: message for updation


12: details updated
13: success for updation
14: updation message displayed

15: request receipt


16: message for receipt

17: receipt printed


18: receipt given
Returns:

Supplier : Buyer : Factory manager System screen : Mat_DB : finished_goods_DB


supply purchaser : User Screen materials_DB : goods_DB

1: receipt for supply of materials


2: message for updation
3: update purchase records

4: success for updation


5: message displayed

6: check for defectives

7: supplier notified
8: returns materials
9: requests receipt
10: receipt given
11: message for updation

12: details updated for purchase returns


13: success for updation

14: message displayed

15: receipt given for sale of goods


16: check for defectives

17: notified
18: returns goods
19: request receipt
20: message for receipt

21: receipt printed


22: receipt given
23: message for updation
24: details updated for sales returns
25: success for updation
26: message displayed
APPLICATION USING COLLABORATION DIAGRAM -
ELEVATOR SYSTEM
USE CASE DIAGRAM
SEQUENCE DIAGRAM
Entry

Elevator button Elevator Main controller door


: passenger

Press button

Sends signal

floor number updated

Request to move

floor reached

checks floor number

stop

move[if not the correct floor, continues to move]

open

if space available :passenger gets in

selects destination

close
Exit

: passenger Elevator button Elevator Main controller door

selects destination

sends floor number

updates floor number

request to move

floor reached

stop

move[if correct floor not reaches]

open

passenger gets out

close
Disaster Management

Fire alarm main controller disaster management


: passenger
commitee

presses fire alarm

sends signal

alerts the commitee

undertakes rescue operations


COLLABORATION DIAGRAM
Entry
COLLABORATION DIAGRAM
Exit
COLLABORATION DIAGRAM
Disaster Management
APPLICATION USING CLASS DIAGRAM –
INVOICE SYSTEM
USE CASE DIAGRAM

Sales
Sales Returns

Employee

Customer
SEQUENCE DIAGRAM
Sales

Employee Customer Desktop Machine Shop Database

1: Requests Product

2: Keys in code to find details


3: Message issued to database

4: Database searched

5: Results shown
6: Results interpreted

7: Customer notified

8: Requests confirmation

9: Confirmation of Customer

10: Product details,Quantity ,rate are keyed into the machine

11: Bill prepared

12: Customer notified

13: Amount paid by cash/card


14: Bill issued

15: Product delivered

16: Update shop database

17: Instruction issued

18: Database updated


Sales Returns

Employee Customer Desktop Machine Shop Database

1: Reports faulty product with bill

2: Checks product for reported fault

3: Keys in unique item code for return to factory

4: Message for updation issued

5: Database Updated

6: Replacement for faulty piece given


COLLABORATION DIAGRAM
Sales

11: Bill prepared

6: Results interpreted
Desktop
Machine Employee

2: Keys in product code to find out details


10: Product details ,Quantity ,Rate are keyed in
16: Update Shop database

3: Message issued to database 7: Customer notified


17: Message for 8: Request Confirmation
5: Result displayed 12: Customer notified
14: Bill issued
15: Product delivered
1: Requests product
9: Confirmation of Customer
4: Database searched 13: Amount paid by cash/card
18: Databas

Shop
Database Customer
Sales Returns

1: Reports faulty product with bill


Customer Employe
e
2: Checks product for reported fault
6: Replacement for faulty piece given

3: Keys in unique item code for return to factory

5: Database Updated

Shop Desktop
Database Machine
4: Message for updation issued
CLASS DIAGRAM

Customer/Buyer Shop Database


name prod_table
Cust_id debtors_table
Address creditors_table
Ph_number
update_db()
Show_last_trans() Show_info()
Show_prod()
Show_drs()
Show_crs()

Product <<Interface>>
prod_code Desktop Machine
qty_available
price get_details()
update_db()
get_prod_info() Search_db()
show_prod_history()
cur_price()
update_prod_stock() Company_Employee
Emp_name
Emp_id
Password

Get_prod_info()
APPLICATION USING STATE DIAGRAM - LIBRARY
MANAGEMENT SYSTEM
USE CASE DIAGRAM

Registration of membership

Issue of books
cancellation of membership
Librarian

return of books

User
SEQUENCE DIAGRAM:
Registration of membership:

User Librarian screen database

1: Request membership card

2: Get user details

3: Feed details to screen

4: Feed details to the database

5: request caution deposit

6: feed the caution deposit amount

7: update caution deposit amount

8: assign membership code

9: Display membership code to user


SEQUENCE DIAGRAM:
Issue of book:

User Librarian Screen Bar Code Book Details User Details Database
Reader

1: Request membership card

2: Get Membership Card from the user

3: Read membership code

4: Check if user is valid

If User is valid
5: Check if the book is available

If book is available
6: Check if the user is valid to issue books

If user is valid
for issue of book
7: Read book code

8: Update user details

9: Update book details


SEQUENCE DIAGRAM:
Return of book

User screen Librarian barcode reader book details user details database

1: Request membership card

2: Get membership card

3: Read membership code

4: Check if membership code is valid

if user is valid

5: Read book code

if book is returned
within due date
6: update book details

7: Update user details

if book is not
returned within
due date

8: Collect fine

9: fine amount collected is updated to database

10: update book details

11: update user details


SEQUENCE DIAGRAM:
Cancellation of membership

User Librarian Screen Bar Code User Details Database


Reader

1: Request membership card

2: Get membership card

3: Read membership code

4: Check if the user is valid

If the user is valid 5: check if the user has returned all the books

If all the books are returned

6: return the caution deposit

7: Delete the user details

8: Delete the user's account from library database


COLLABORATION DIAGRAM:
Registration of membership:

User
screen

3: Feed details to screen


6: feed the caution deposit amount

4: Feed details to the database


7: update caution deposit amount
2: Get user details

1: Request membership card


5: request caution deposit
9: Display membership code to user

8: assign membership code

Librarian database
COLLABORATION DIAGRAM:
Issue of book:

Screen
User Bar Code
Reader

2: Get Membership Card from the user

3: Read membership code


4: Check if user is valid
7: Read book code

1: Request membership card Database

User
6: Check if the user is valid to issue books
Details
8: Update user details

Librarian 5: Check if the book is available


9: Update book details

Book
Details
COLLABORATION DIAGRAM:
Return of book:

screen
User
barcode
reader

2: Get membership card


8: Collect fine
3: Read membership code
5: Read book code

4: Check if membership code is valid

1: Request membership card

9: fine amount collected is updated to database database

Librarian
7: Update user details
11: update user details

6: update book details


10: update book details
user
details

book
details
COLLABORATION DIAGRAM:
Cancellation of membership:

User Screen
Database

6: return the caution deposit

8: Delete the user's account from library database

1: Request membership card

4: Check if the user is valid


2: Get membership card

3: Read membership code Bar Code


Reader
Librarian

5: check if the user has returned all the books


7: Delete the user details

User
Details
CLASS DIAGRAM:

Bar code reader


memb_code : type = number
book_code : type = number

read memb_code()
read book_code()

user details
book details
memb_code : type = number
book_code : type = number user_name : type = character
book_name : type = character no of books allowed for issue : type = number
author_name : type = character
no of copies available : type = character get user_details()
add_user()
search_book() delete user()
add_book() update user()
update no. of copies() issue_updation()
check book available()

Database
memb_code : type = number
book_code : type = number
user_account : type: character
book_account : type = character
caution deposit : type = currency

check memb_code valid()


assign memb_code()
get cautiion deposit()
update user account()
update book account()
STATE DIAGRAM:
State diagram for user class

user validation
user allowed for issue of book[ memb_code is valid ]
start
do/ check memb_code

issue of book

entry/ check if user is exceeding maximum no of book for issue


do/ search for the book requested
exit/ book is issued, updated to database user allowed to return books[ memb_code is valid ]

invalid memb_code[ memb_code is invalid ]

return of book
close do/ fine is calculated if book is returned beyond the due date
exit/ book is returned, database updated
exit/ exits the user account

stop
APPLICATION USING COMPONENT DIAGRAM –
PAYROLL SYSTEM
USE CASE DIAGRAM:
SEQUENCE DIAGRAM:
Registration of new employee:

Employee Controller Screen Database

1: Request employee details

2: Get employee details

3: Feeds details to screen

4: Saves the details

5: Assigns employee id

6: Issues employee id
SEQUENCE DIAGRAM:
Payment of salary:

Employee Controller Screen Database

1: Gets employee id

2: Feeds id to screen

3: Check if emp id is valid

4: Request employee information

5: Shows employee details

6: Requests for allowance and deduction details

7: Sends request

8: Allowance and deduction details shown

9: Requests for employee's net salary

10: Sends request

Net salary=Basic
+allowance-
11: Calculate net salary deduction

12: Salary details shown


13: Issue pay-slip

14: Request to update database

15: Database updated


COLLABORATION DIAGRAM:
Registration of new employee:

Database
Employee

6: Issues employee id 4: Saves the details

2: Get employee details 5: Assigns employee id

3: Feeds details to screen


Controller Screen

1: Request employee details


Payment of salary:
3: Check if emp id is valid
11: Calculate net salary

Employee

Database

13: Issue pay-slip


4: Request employee information
7: Sends request
10: Sends request
15: Database updated
1: Gets employee id

5: Shows employee details


8: Allowance and deduction details shown
12: Salary details shown
2: Feeds id to screen
6: Requests for allowance and deduction details
9: Requests for employee's net salary
Controller 14: Request to update database

Screen

CLASS DIAGRAM:
Database
Emp_Name
Emp_id
Emp_date_of_birth
Emp_ Address Controller 1
Emp_Contact_no
Emp_Designation Retrieve_employee_details()
Display_net_salary()
Get_employee_details()
Calculate_net_salary()
Assign_emp_id()
STATE DIAGRAM:
State diagram for database class:

Start
Allowance and deductions

entry/ Check if the employee has any allowance or deductions

[ if emp id is valid ]
[ if no allowance or deductions for employee ]

Check if valid
[ if any allowance or deductions for employee ]
employee
entry/ Check emp id

Allot salary Allot salary(no allowance or


deduction)
entry/ net pay=basic salary+allowance-deductions
entry/ net pay=basic salary

[ If emp id is not valid ]

Salary provided

entry/ pay salary to employee


exit/ issue pay slip to employee

Stop
COMPONENT DIAGRAM:

SubprogSpec for registration SubprogSpec for payment of salary

Registration of new employee Payment of salary

Main program
Header files

Library files(.dll files) Payroll.cpp

Payroll.exe
Payroll.obj
APPLICATION USING DEPLOYMENT DIAGRAM –
RAILWAY RESERVATION SYSTEM
USE CASE DIAGRAM
SEQUENCE DIAGRAM
Reservation
Checking availability
Providing details
COLLABORATION DIAGRAM
Checking availability
Providing details

Reservation
CLASS DIAGRAM
STATE DIAGRAM
TICKET CLASS
COMPONENT DIAGRAM
railway system

railway sys.lib

railways.cpp

booking.cpp cancellation.cpp

reserve.exe cancel.exe

DEPLOYMENT DIAGRAM
APPLICATION USING DEPLOYMENT DIAGRAM
TELEPHONE SYSTEM
USE CASE DIAGRAM

Make a Call Receive a Call

User

SEQUENCE DIAGRAM
Make a Call

User Telephone Telephone Destination


Switch
1: Access Phone

2: Ring tone

3: Dial Number

4: Issues number to switch

5: Checks if number exists

6: Checks if number is available

7: Call is connected to destination

8: Picks Receiver

9: Call Connected

10: Call Tmer starts

11: Conversation starts

12: Keeps Receiver Down

13: Call disconnected

14: Call timer stopped


Receive a call

User Telephone Telephone Destination


Switch

1: Dialled number

2: Call issued to telephone switch


3: Phone rings

4: Picks phone

5: Call connected

6: Timer starts

7: Conversation

8: Keeps receiver down

9: Call disconnected

10: Timer stopped


COLLABORATION DIAGRAM
Make a call
User 1: Access Phone
3: Dial Number

8: Picks Receiver
12: Keeps Receiver Down
2: Ring tone Telephone

9: Call Connected
11: Conversation starts 4: Issues number to switch
13: Call disconnected

5: Checks if number exists


6: Checks if number is available
10: Call Tmer starts
Destination 14: Call timer stopped

Telephone
Switch
7: Call is connected to destination

Receive a call
1: Dialled number
6: Timer starts
10: Timer stopped

Destinati 2: Call issued to telephone switch


on
Telephone
Switch

7: Conversation
9: Call disconnected
5: Call connected
3: Phone rings

4: Picks phone
8: Keeps receiver down
User Telephon
e
CLASS DIAGRAM

Call
Caller start_time
Cust_id end_time
Cust_add +telephone duration
Phone_no
calc_duration()
make_a_call() calc_cost()
update_call_history()
STATE TRANSITION DIAGRAM

Ring Tone

User accesses Phone entry: Pick Receiver


do: Enter number
exit: wait for call connecting status

wait for call connection

Call Connecting
do: Wait for Call Connection

[ The Person is Busy on another call ]


Busy
do: Try again,Later

[ The Person picks the receiver ]

[ no response from the person ]

Connected
do: Talk
exit: Keep Receiver Down
COMPONENT DIAGRAM

Telephone.cpp Telephone.H

Telephone_sys

telephone.lib telephone.bak

telephone.obj

telephone.dll
telephone.exe

receive_a_call.exe make_a_call.exe
DEPLOYMENT DIAGRAM

Button pad

pulse/tone Telephone
Microphone

twisted cable
Receiver

Speaker

You might also like