UML-lab-manual-by-gupta

33
Page No: Class Diagram for unified library system UsersDatabase N am e : String Id : N um ber Branch : String Working() NotWorking() UsersDatabase() VIPU ser R equestNew Book() H om eDelivery() BorrowC Ds() ReturnCDs() VIPU ser() Librarian Q ualification : S tring LibrarianExperience : Integer LibrarianID : N um ber LibrarianPassw ord : String U pdateBook(): Boolean C heckD atabase() AddBook() DeleteBook() Librarian() Login() Database AddBooks() DeleteBook() AddC Ds() DeleteC DS() AddMagazines() DeleteM agazines() Database() LibrarySystem LibraryN am e : String LibraryIncharge : Logical View : String LibrarianN am e : String ViewLibraryD atabase() View UsersList() LibrarySystem () +W orks in +Need for U ser U serN am e : S tring U serID : N am e U serPassw ord : String Login() 1..* <<uses>> <<uses>> NormalUser Branch : String NormalUser() BookList BookAuthor: String BookId :Integer U pdateBook() VIewBookList() BookList() Student Student() 1..* +C hecks Borrow Book BookList() C DList() C DList C D Id : LogicalView : String SoftwareNam e : S tring UpdateCDs() ViewCDList() C DList() Staff Departm ent : String D esignation : String RequestForM oreBooks() Staff() +C hecks 1..* +Borrow s 1..* BorrowC D C D N am e : String StaffN am e : String C DList() +m _LibrarySystem +m _U ser Sri sai aditya institute of science & technology Roll No: 10P31D5816

description

lab manual of UML

Transcript of UML-lab-manual-by-gupta

Page 1: UML-lab-manual-by-gupta

Page No:

Class Diagram for unified library system

UsersDatabase

Name : StringId : NumberBranch : String

Working()NotWorking()UsersDatabase()

VIPUser

RequestNewBook()HomeDelivery()BorrowCDs()ReturnCDs()VIPUser()

Librarian

Qualification : StringLibrarianExperience : IntegerLibrarianID : NumberLibrarianPassword : StringUpdateBook() : Boolean

CheckDatabase()AddBook()DeleteBook()Librarian()Login()

Database

AddBooks()DeleteBook()AddCDs()DeleteCDS()AddMagazines()DeleteMagazines()Database()

LibrarySystem

LibraryName : StringLibraryIncharge : Logical View : StringLibrarianName : String

ViewLibraryDatabase()ViewUsersList()LibrarySystem()

+Works in

+Need for

User

UserName : StringUserID : NameUserPassword : String

Login()

1..*1..*

<<uses>>

<<uses>>

NormalUser

Branch : String

NormalUser()

BookList

BookAuthor : StringBookId : Integer

UpdateBook()VIewBookList()BookList()

Student

Student()

1..*1..*

+Checks

BorrowBook

BookList()CDList()

CDList

CDId : LogicalView : StringSoftwareName : String

UpdateCDs()ViewCDList()CDList()

Staff

Department : StringDesignation : String

RequestForMoreBooks()Staff()

1..*

1..*

+Checks1..*

+Borrows

1..*BorrowCD

CDName : StringStaffName : String

CDList()

+m_LibrarySystem

+m_User

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 2: UML-lab-manual-by-gupta

Page No:

Use case Diagram for Unified Library System

Sri sai aditya institute of science & technology Roll No: 10P31D5816

RequestForVIPUser

ManageBook

AddBook

DeleteBook

UpdateBook

ViewAllBooks

Login

Librarian

BorrowBook

ReturnBook

ReserveBook

RenewalBook

SearchBook

FeedBack

User

Login

Student

NewUser

Staff

MaintainDatabase

LibraryDatabase

UserRegistration

RequestForNewBook

BorrowCD

HomeDelivery

ReturnCD

VIPUser

Page 3: UML-lab-manual-by-gupta

Page No:

A Sequence Diagram Using Library System :

A ) User Registration :

: user

Registration Form

Registration DataBase

1:Request Registration Form

2 :Details For Registration

3 :Give Details

4 :Register

5 :Update Registration

6 :Confirm Registration

B) Add a Book:

Sri sai aditya institute of science & technology Roll No: 10P31D5816

: userSystem Interface

Book List User Account

Sign InCheck Valid or Not

Valid User ID

View Book List

Display Book List

Borrow Book With Title Search Book

Recheck if Available

Check User Account

Verify Status

Book Not in Account

Issue the Book

Page 4: UML-lab-manual-by-gupta

Page No:

c) Borrow A Book:

Sri sai aditya institute of science & technology Roll No: 10P31D5816

: userSystem Interface

Book List Library DataBase

Request for Login

check Valid or not

Valid User

Add Book with title

Check valid or not

Invalid Book Already existed

Add Book With Title

Check valid or not

Valid Book Adder

Update the DataBase

DataBase Updated

Page 5: UML-lab-manual-by-gupta

Page No:

A collaboration Diagram Using Library System:

a)User Registration:

B) Add a Book:

Sri sai aditya institute of science & technology Roll No: 10P31D5816

: user

Registration Form

RegistrationDataBase

1: 1:Request Registration Form

2: 2 :Details For Registration

3: 3 :Give Details6: 6 :Confirm Registration

4: 4 :Register

5: 5 :Update Registration

12: Issue the Book

: user System Interface

Book List

User Account

2: Check Valid or Not

9: Verify Status

10: Recheck if Available

1: Sign In6: Borrow Book With Title

3: Valid User ID

4: View Book List5: Display Book List

7: Search Book

8: Check User Account

11: Book Not in Account

Page 6: UML-lab-manual-by-gupta

Page No:

c ) Borrow A Book:

: user System Interface

Book List

Library DataBase

2: check Valid or not

5: Check valid or not8: Check valid or not

1: Request for Login

3: Valid User9: Valid Book Adder

4: Add Book with title7: Add Book With Title6: Invalid Book Already existed

10: Update the DataBase

11: DataBase Updated

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 7: UML-lab-manual-by-gupta

Page No:

Activity diagram for Library Management System

Sri sai aditya institute of science & technology Roll No: 10P31D5816

SubmitApplication

IssueMembership

BookBank[ Reservation ]

IssueBooks

ReturnBooksinTime

CollectFine[ Late Submission ]

Rearrange Book

[ else ]

Page 8: UML-lab-manual-by-gupta

Page No:

State Chart diagram For Library Management System

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Title Resevation / No of reservations++

Available Entry

entry/ No of Reservations

Reserverd

Remove Reservations / No of Reservations --Title Reservations / No of Reservations ++

Remove Reservations / No of Reservations --

Page 9: UML-lab-manual-by-gupta

Page No:

Component diagram for Library Management System

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Library System

Librarian User DataBase

User DataBase

Normal User VIP User Book List CD List

StudentStaff

Page 10: UML-lab-manual-by-gupta

Page No:

Deployment Diagram for Library Management System

Sri sai aditya institute of science & technology Roll No: 10P31D5816

:MidrangeMachine

Any Client

:AppServer<<execution environment>>

LibraryDB:DBMachine

<<artifact>>Librarian.war

Page 11: UML-lab-manual-by-gupta

Page No:

Class Diagram for Leave Management System:

Employee

empid : numname : stringdoj : datedept : string

view numof leaves()place leave request()view leave reqstatus()

leaverequest

type : stringfromd : dateto : dateno.ofleaves : num

calnumleaves()chekavail()

** **

fill leavereq form

principal

empid : numname : stringdoj : datedept : string

viewleavereq()acceptLeave()rejectleave()

*

1

*

1

view leavereq

hod

empid : numname : stringdoj : datedept : string

viewleavereq()forwardreq()rejectreq()

*

*

*

*

place leave request

*

1

*

1

view leavereq

1* 1*

forward leavereq

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 12: UML-lab-manual-by-gupta

Page No:

Use case Diagram for Leave Management System:

viewno.of leaves

apply leave

employee

view leave req form

forward leave req

Hod

reject leave req

view leave req

Principle

accept/reject leave

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 13: UML-lab-manual-by-gupta

Page No:

Sequence Diagram for Leave Management System:

employee hod:leavemgt principal :database

login verifydetails

authenticated

checknumof leaves retrieve information

display information

fill leave reqsave request

login

view leavereq

display reqforward req

view req

dispaly req

accept leave

update information

view leave req status

retrieve information

dispaly information

logout

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 14: UML-lab-manual-by-gupta

Page No:

Collaboration Diagram for Leave Management System:

employee

hod

principal

:leavemgt :database

1: login4: checknumof leaves

7: fill leave req17: view leave req status

20: logout

3: authenticated6: display information19: dispaly information

9: login10: view leavereq

11: display req

12: forward req

13: view req15: accept leave

14: dispaly req

2: verifydetails5: retrieve information

8: save request16: update information18: retrieve information

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 15: UML-lab-manual-by-gupta

Page No:

Activity Diagram for Leave Management System:

(a)Employee:

check num of leaves

if leaves

Fill leave req form

yes

leave request not allowed

no

place req to hod

view leave status

login

logout

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 16: UML-lab-manual-by-gupta

Page No:

(b)Hod:

hod login

view leave requst form

check leave details

forward leave request

reject leave request

Logout

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 17: UML-lab-manual-by-gupta

Page No:

(c) Principal:

principal login

view leave request

Accept leave Reject Leave

LogOut

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 18: UML-lab-manual-by-gupta

Page No:

State chart Diagram for leave Management System:

(a)Employee

idle state

entry state

loginloginemployee id,pwd

verification

authenticated

check leaves avilable

place leave req

view leave status

logout

authenticated

check leaves avilable

place leave req

view leave status

logout

exit

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 19: UML-lab-manual-by-gupta

Page No:

(b)Hod

Idle state

Entry state

LoginLogin

Verification

Authenticated

view leave Request

forward leave

logout

hod id,pwd

Authenticated

view leave Request

forward leave

logout

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 20: UML-lab-manual-by-gupta

Page No:

(c) Principal

Idle State

EntryState

LoginLoginprincipal id,pwd

VerIfication

AuthenTicated

View Leave Request

Accept Leave

LogOut

AuthenTicated

View Leave Request

Accept Leave

LogOut

exit

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 21: UML-lab-manual-by-gupta

Page No:

Component Diagram for Leave Management System:

leavereq.exe

place leave req

update.exe

grant leave.exe

Accept/reject leave

database

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 22: UML-lab-manual-by-gupta

Page No:

Deployment Diagram for Leave Management System:

Leaverequest.exe grant.exe update.exe

leavemgt.exe

accpt/reject updatestatussubmits

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 23: UML-lab-manual-by-gupta

Page No:

Class Diagram for Elevator System:

Button class

illuminated : boolean

buttonpress()

ElevatorButton

illuminated : boolean

elebuttonpress()

FloorButton

illuminated : boolean

floorbuttonpress()

ElevatorController

1

*

1

*

controls

1

*

1

*

Controls

Elevator

doorsopen : boolean

*

11

*

Use case Diagram for Elevator System:

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 24: UML-lab-manual-by-gupta

Page No:

Press an Elevator Button

USER

Press a Floor Button

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 25: UML-lab-manual-by-gupta

Page No:

Sequence Diagram for Elevator System:

: USER:ElevatorButton

:FloorButton :Elevator Controller

:Elevator

press floor button

send requestmove in floor direction

check request

illumination cancelled

open doors

enters into elevator

press elevator button

send request

move in specified floor direction

check request

open doors

comes out of elevator

doors closed

wait for next request

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 26: UML-lab-manual-by-gupta

Page No:

Collaboration diagram for Elevator System

: USER

:ElevatorButton

:FloorButton

:Elevator Controller

:Elevator

2: send request

3: move in floor direction

4: check request

5: illumination cancelled

6: open doors

9: send request

10: move in specified floor direction

11: check request

12: open doors14: doors closed

15: wait for next request

1: press floor button

7: enters into elevator13: comes out of elevator

8: press elevator button

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 27: UML-lab-manual-by-gupta

Page No:

Activity Diagram for Elevator System:

pending requests?

going into wait state

no

processing new request

update request

move elevator in floor direction

check req floor or not

continue to move in floor direction

no

stop at floor

turn off elevator button

yes

yes

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 28: UML-lab-manual-by-gupta

Page No:

State Chart Diagram for Elevator System:

Elevator Event Loop

no requests pending doors closed

Processing new request

button pushed

determine if stop requested

continue moving

Stop at floor

Turn off elevator button

no request at floor user request stop

move in floor direction

Sri sai aditya institute of science & technology Roll No: 10P31D5816

Page 29: UML-lab-manual-by-gupta

Page No:

Component diagram for Elevator System:

eleButto.exe

floor button.exe

elecontroller.exe

press elevator button

press floor button

Deployment Diagram for Elevator System:

eleButtonpress.exeFloorbutton.exe

Elecontroller.exe

requests requests

Sri sai aditya institute of science & technology Roll No: 10P31D5816