Sei sulla pagina 1di 63

PART B -----CASE TOOLS- UML- LAB

INTRODUCTION:
USECASE DIAGRAM:
A behavioral diagram that shows a set of use cases and actors and their relation ships.
USECASE:

It is a description of set of sequence of actions that a system performs that yields an observable result of value to a particular actor. An use case is used to structure the behavioral things in a model and it is rendered as an ellipse with solid line along with its name.

Actor:
It specifies a coherent set of roles that users of use cases play when interacting with these use cases.

CLASS DIAGRAM:
A structural diagram that shows a set of classes, interfaces, collaborations, and their relationships.

OBJECT DIAGRAM:
A structural diagram that shows a set of objects and their relationships.

SEQUENCE DIAGRAM:
A behavioral diagram that shows an interaction, emphasizing the time ordering of messages.

COLLABORATION DIAGRAM:
A behavioural diagram that shows an interaction, emphasizing the structural organization of the objects that send and receive meassages.

STATECHART DIAGRAM:
A behavioural diagram that shows a state machine, emphasizing the event-ordered behavior of an object.

ACTIVITY DIAGRAM :

An activity diagram represents the e ecution state of a mechanism as a sequence of steps grouped sequentially as parallel conrol flow branches.It is a variant of state chart diagrams organized according to actions and internal behavior of a method or a usecase.

Activity diagram s are used to model the dynamic aspects of system. !wimlanes "or#ing $oining COMPONENT DIAGRAM:
%omponent diagrams are basically used to model static view of the system. &his can be achieved by modeling various physical components li#e libraries, tables, files etc. which are residing within a node. %omponent diagrams are very essential for constructing e ecutable systems. &his can be done using concepts of forward and reverse engineering. &he graphical representation of a component diagrams basically include collection of vertices and arcs.

DEPLOYMENT DIAGRAM:
'eployment is the stage of development that describes the configuration of the running system in a real time environment."or deployment,decisions should be made about configuration parameters,performece,resource allocation ,distribution and concurency.&he component develop or reused should be deployed on some set o f hardware for e ecution.(odes are used to model the topology of the hardware on which the system e ecutes.A node usually represents a processor or a device on which components can be deployed

Case Stu ! ": L#$rar! A%%&#cat#o'


). Problem Statement:
A lightweight set of features for the first version of the library application might loo# li#e this: It is a support system for a library. &he library lends boo#s and magazines to borrowers, who are registered in the system, as are the boo#s and magazines. &he library handles the purchase of new titles for the library. *opular titles are bought in multiple copies. +ld boo#s and magazines are removed when they are out of date or in poor condition. &he librarian is an employee of the library who interacts with the customers ,borrowersand whose wor# is supported by the system. A borrower can reserve a boo# or magazine that is not currently available in the library, so that when it.s returned or purchased by the library, that borrower is notified. &he reservation is cancelled when the borrower chec#s out the boo# or magazine or through an e plicit canceling procedure. &he librarian can easily create, update, and delete information about the titles, borrowers, loans, and reservations in the system. &he system can run on all popular /eb browser platforms ,Internet 0 plorer 1.)2, (etscape 3.42, and so on-.&he system is easy to e tend with new functionality.

2. Identification of actors and use cases:


&he use cases in the library system are as follows: 5ogin !earch 6rowse 7a#e 8eservation 8emove 8eservation %hec#out Item

8eturn Item 7anage &itles 7anage Items 7anage 6orrowers 7anage 5ibrarians Assume Identity of 6orrower

&he outline of the basic flow for the use case %hec#out Item ,which means that a 6orrower can chec# out an Item- is described as follows: ). &he borrower chooses to perform a 9!earch: for desired titles; <. &he system prompts the borrower to enter !earch criteria. =. &he borrower specifies the search criteria and submits the search. 3. &he system locates matching titles and displays them to the borrower. 1. &he borrower selects a title to chec# out. >. &he system displays the details of the title, as well as whether or not there is an available item to be chec#ed out. ?. &he borrower confirms that he or she wishes to chec#out the item. @. &he system chec#s out the item. A. !teps ) to @ can be repeated as often as desired by the borrower. )4. &he borrower completes chec#out. )). &he system notifies a librarian that the borrower has concluded the chec#out item session and displays instructions for the borrower to collect the contents.

3: Identification of actors and use cases:

Registered !ser

Login

Browse

earch

Librarian

Manage Borrowers

Remove reservation

Borrower

Manage Items

Make Reservation

Manage Titles

Checkout Item

Assume Identity Of Borrower

Return Item

Master Librarian

Manage Librarian

Fig: A use-case diagram for library system

%lass diagram for library system:

Fig:

classes for the library system

librarian )* )*$$+ L"/I ITOR v"name time refers'( LIBRARlib"name lib"add timings'( )* L" TA,, sta"name sta"desig sta"id lend'( maintain'( log'( )*$$+ is member of maintains

).$$+ visits

)*

)*

)*$$+

associated with

).$$+ L"M&MB&R mem"name mem"add no$books take'( visit'( read'( )*$$+ uses L"BOO# bk"name bk"id no$co%ies

)*$$+

)*$$+

Borrower
can Borrow'(

makes
.$$+

Reservation
creation1ate 0 1ate 2 current1ate .$$+

checks out
.$$+

references
*

Title
name 0 tring getLendingTime'( *

Loan
creation1ate 0 1ate 2 current1ate

Item
id 0 integer

.$$+

Book Title
lendingTime 0 1ays 2 3.

Mag4ine Title
lendingTime 0 1ays 2 *.

c&asses (or t)e &#$rar! s!ste*+

Sequence diagram for use case Return Item:

0Return item 0 Borrower *0 s%ecify criteria'(

0Return item Controller

0Title

0Borrower

0item

50 search'(

30 search'criteria( 60 get matching'criteria(

70 select title'(

80 get item'title(

90 get item'(

:0 select item'(

;0 return'(

*.0 return'item(

**0 can return 'item(

*50 <barrower is allowed to return this item= *30 set status'(

Fig: collaboration diagram for use case Return Item

**0 can return 'item( *50 <barrower is allowed to return this item= 0Return item Controller 60 get matching'criteria( 90 get item'( 0Title *30 set status'( 0item 30 search'criteria( 80 get item'title( *.0 return'item( 70 select title'( *0:0 s%ecify selectcriteria'( item'( 50 ;0search'( return'( 0Return item 0 Borrower 0Borrow er

10

Sequence diagram for use cases: Checkout Item:

0 Borrower 0 CheckoutItem,orm *0 s%ecify citeria'(

0 CheckoutItemCont$$$

0 Title

0 Borrower

0 Item

50 search'(

30 search'criteria(

60 get matching'criteria(

70 select title'(

80 get items'title(

90 get items'(

:0 select item'(

;0 checkout'(

*.0 checkout'item(

**0 can checkout'item( *50 checkout'item(

*30 set status'(

11

*0 %ecify criteria'( 50 earch'( 70 select title'( :0 select item'( ;0 checkout'( 0 0Borrower

0 Item

0 checkoutItem,orm 30 search'criteria( 80 getitem'title( *.0 checkout'item( 0 Borrower 60 getmatching'criteria( 90 getitems'(

0 checkoutItemController

0 Title

Fig: collaboration diagram for Checkout Item

12

Sequence diagram for use case login:

13

0 !serLocator 0&m%loyeeActor 0 &m%loyeeLogin!I 0 Login>orkflow 0 !ser

dis%layLogin,orm'( submit?ame And@assword'( validateLogin'( findby?ame'(

?!LL' ( I?/ALI1 dis%lay&rrorMessage'(

14

;0 dis%lay&rrorMessages' ( *0 dis%layLogin,orm' ( 50 submit?ameAnd@assword' (

0 &moloyeeActor

0 &m%loyeeLogin!I 30 validateLogin' ( :0 I?/ALI1 90 I?/ALI1 80 validateLogin' ( 70 ! &ROBA&CT 60 findBy?ame' ( 0 !serLocator

0 !ser

0 Login>ork,low

Fig: collaboration diagram for login

15

Activity diagram for library application:

student

librarystaff

librarian

staff

submit A%%lication 3 cards Take cards borrow

verify details

Issue cards

submit a%%lication

check for reference non ref issue books

take cards

Renewal

ref

borrow books

Return

search another book take the book

ty%e of transaction

Reference

return books search books

Bet the Book u%date database search and read books

u%date members book

16

STATE MAC I!E "IA#RAM F$R T E TIT%E C%ASS:

Available
entryC ?umber of reservations 2 .

Title reservation C ?umber of reservations )) Reservation removed< ?umber of reservations 2 * = C ?umber of reservations DD Title reservation C ?umber of reservations))

Reserved

Reservation removed< ?umber of reservation 2 *= C ?umber of reservation DD

17

not reserved &ntry0reservation num2.

title reservationCreserved co%ies))

reserved reservation removedCreserved co%iesDD

STATE DIAGRAM FOR LIBRARY SYSTEM

Component diagram :
Component diagram for library application: Figure1: tudent issue register$Eava

librarian$E ava

item$Eava

Figure2:

18

itemmEr$Ea va

item1AO $Eava

item1AO$ mysFl$Eava

item1AOA cess$Eava

Deployment diagram for library applications


Deployment ! ally refer! to tran!fering t"e pro#ect to t"e re$ ired end !er! along %it" t"e pro#ect doc mentation&Deployment diagram! are al!o e!!ential in eac" application !ince it narrate! pac'aged !cenario of interaction follo%ing i! a deployment diagram referring to nified library application !cenario

Figure 1:

19

studentCstaff

library database

library management

Figure 2:

GG%rocessorHH library system

GG%rocessorHH Ibook serverJ

GG%rocessorHH login server

GG%rocessorHH GGcheck out

Case Stu ! ,: STUDENT INFORMATION SYSTEM:


Problem statement:-

20

To !n" t#e !n ormat!on re$ar"!n$ st%"ents st%"&!n$ !n a 'art!(%lar !nst!t%te )#!(# !n(l%"e atten"en(e an" mar*s

Use(ase "!a$ram

lecturer a

amend student

find student add student

check grades

delete student

21

MAI?TAI? TA,, I?,O

GGincludeHH

maintain staff info

maintain attendence GGusesHH

GGincludeHH

GGincludeHH

%erformence maintain subEests info

maintain time table

register for course

student

write eKaminations

%ay fee

22

MAI?TAI? C!RRIC!L!M

GGincludeHH

maintain curriculum

introduce new course

GGincludeHH

GGincludeHH

u%date syllabus maintain in take details

23

maintain circulam

registrar

maintain stu info

maintain staff info

(la!! diagram:

24

)*$$+ !niversity uni"name uni"code uni"cl4 admissions'( schedule'( )* GGaggregationHH member 1e%artment de%t"name de%t"id con"class'( con"eKam'( )*$$+ )* GGaggregationHH assigned to GGaggregationHH head of

has

reffered

)+ tudent stu"name stu"id stu"add stu"%h attend"class'( listen'( write"eKam'( )*$$+ Course cou"name cou"id cou"ty%e teaches

)*$$+ taff staff"name staff"id staff"add staff"%h take"class'( evaluate'(

attends

)+

)*$$+

)*

(la!! diagram:

25

1e%artment
name number ,aK num LO1 find'( 1elete'( Amend'(

cot tudent b
?ame Adress tudent number Bender ,ind'( add'( 1elete'( Amend'(

law Module
code Module leader level name ,ind'( select'( change'( Allocate'(

)has
*$$+

)canTake
*$$+

)e$ ence diagram:

26

student

a%%lication

interview

admission

*0send

50attend

30<%ass= admit

(ollaboration:

*0 *0send student a%%lication

50 50attend 30 30<%ass= admit

admission

interview

27

)e$ ence diagram:

1e%artment 0 lecturer a *0 find'(

Module

student

50 add'(

30 elect'(

60 list'(

(ollaboration:
*0 find'( 1e%artm ent 0 lecturer a

30 elect'(

50 add'(

60 list'( Module student

28

A%&IBI&C 'IAD8A7!

student sends a reF for grade

confirms that the given reF student no is available

?O

check %assM

-&

checkNG87 checkNH97 ?O

third class

-&

first class

second class

29

start

get the marks of all the students

calculate %ercentages

ifNH297 yes A grade no if 8.G2NG97 yes B grade no

if NG8. yes C grade

no

sto% %rocess

30

tart

&nter student details GGCondition CheckingHH Invalid id Cancel ReFuest /alid tudent Id' ?o ( GGCondition CheckingHH /alid tudentId' -es ( check student id

Calculate Attendence 1is%lay Results

&nd

Calculate Marks

&nd &nd

31

STATE TRANSITION DIAGRAM FOR STUDENT INFORMATION

)tate c"art diagram

Create

@robatio nal ucessfully com%leted 8 months %eriod @ermane nt

On successful com%letion of 8 month %eriod

Resigned Left

32

initiali4ation 1o0initiali4e batch

add studentCset c2.

o%en

&ntry0Register students &Kit0 increment student

cancel

cancel

<c2n=

cancelled 1o0notify registered students

cancel

close 1o0finali4e batch

STATE TRANSITION DIAGRAM FOR STUDENT INFORMATION

33

student state chart diagram Initiali4ation do0initiali4e batch add student set c2.

O%en student

&ntry0Register &Kit0Increment student

cancel

cancel

cancelld do0notify registered students cancel

Brades 1o0H 97N *st class G 87N and H 7.N5nd class G 7.N O %ass 3rd class

close do0finali4e batch

34

(omponent diagram
1e%artm ent

tudent

Course

Deployment diagram

taff

Login server

tuden t

35

Case stu ! -: Ba'. ATM SYSTEM:

Pro$&e* state*e't:/

S01 s!ste* #s to $e es#2'e (or su%%ort#'2 a co*%uter#3e ATM $a'.#'2


'01+A&& t)e accou'ts *a#'ta#'e #' t)e $a'. a' a&so t)e tra'sact#o's e((ecte 4#'c&u #'2 ATM tra'sact#o's 4are to $e %rocesse $! t)e co*%uters #' t)e $a'.+ A' ATM acce%ts a re&e5a't cas) car #'teracts 1#t) t)e user4co**u'#cates 1#t) t)e ce'tra& s!ste* to carr! out t)e tra'sact#o'4 #s%e'ses cas)4a' %r#'t rece#%ts+ T)e s!ste* to $e es#2'e a' #*%&e*e'te *ust #'c&u e a%%ro%r##ate recor .ee%#'2 a' secur#t! %ro5#s#o's+T)e s!ste* *ust )a' &e co'curre't accesses to t)e sa*e accou't+

36

USE CASE DIAGRAM:

change%in

customer

session
GGincludeHH GGincludeHH verifycheFue

enFuiry

Transaction

de%ositcheFue

viewbal view aCc details viewtransListory

transfer
GGincludeHH GGincludeHH

withdrawl
GGincludeHH

GGincludeHH

GGeKtendHH

GGincludeHH GGincludeHH

1e%osite amount
GGincludeHH GGincludeHH

verifymindetail re%ort out of bal


GGincludeHH

verify aCc ty%e u%date balance

u%date trans histo

37

ATM CLASS DIAGRAM:

Bank server ATM card


card no 0 int aCc no 0 int card ty%e 0 str

customer OWN
aCc no 0 str name 0 str add 0 str %hone no 0 int withdrawl'( de%osit'( transfer'( view bal'(

server"id 0 int name 0 string location 0 str

bank server o%erations


valid %in'( change %in'(

uses

session
session id aCc no trans id session'(

performs

commit'( rollback'( create aCc'( delete aCc'( view details'( u%date details'( trans'( valid %in'( change %in'(

Account holds Transaction'(


no trans"id trans"ty%e amt commit'( add'( Acc"no 0 int aCc"ty%e 0 str bal 0 float commit'( rollback'( add'(

saving aCc

current aCc

38

0(EFI8C A%&IBI&C 'IAD8A7

customer *0 Insert card 50 Obtain @in

0 ATM machine

0 Bank server

39

!0EF0(%0 'IAD8A7

%+55A6+8A&I+(

custome r

*0 Insert card 30 &nter @in 90 1e%osit Amt

50 Obtain @in 80 &nter de%osit amt :0 O%en de%osit slot ;0 Insert &nvelo% amt slot *.0 &nvelo% recived 70 /alid @in

0 ATM machine

60 /alidate @in

0 Bank server

40

customer *0 Insert Card

0 session

0 Bank server 50 Obtain @in

30 &nter @in 60 end @in 70 ReFuest

80 Obtain ty%es of enFuiry 90 Ty%e :0 Bet aCc noPs ;0 seif *.0 Bal enFuiry **0 Current bal *50 Transaction history *30 @revious trans *60 /iew aCc details

*70 1is%lay'aCc noQbalQnames(

41

!0EF0(%0 'IAD8A7

custome r

*0 Insert Card 90 Ty%e

30 &nter @in 70 ReFuest 80 Obtain ty%es of enFuiry

;0 seif

0 session **0 Current bal *30 @revious trans *70 1is%lay'aCc noQbalQnames( 50 Obtain @in 60 end @in :0 Bet aCc noPs *.0 Bal enFuiry *50 Transaction history *60 /iew aCc details
0nquiry collaboration:

0 Bank server

%+55A6+8A&I+(

42

customer *0 Insert Card

0 ATM machine

0 Bank server

50 /alidate @in 30 /alidate

60 Choose Transaction 70 >ithdraw 80 Check Balance 90 ufficiant Balance :0 Creadit cash ;0 Insufficiant Balance

*.0 Low balance

*it"dra% !e$ ence diagram:

43

%+55A6+8A&I+(

custome r

*0 Insert Card 60 Choose Transaction 70 >ithdraw :0 Creadit cash *.0 Low balance

0 ATM machine

30 /alidate 90 ufficiant Balance ;0 Insufficiant Balance

50 /alidate @in 80 Check Balance

0 Bank server

44

A(+,-,+,. /01*

45

customer

ATM

bank serv er

insert card

enter @I?

validate @I?

select transaction

start transaction

0validation <success=

receive cash

0transaction withdraw

0recei%t %rint

close transaction

46

TAT& CLART ,OR ATM

idle

enterC%ressed

ready

%ress <first digitH.=

neKt number

enterC%ressed

validate

invalid

valid transactions cancel %ressed cancel

com%lete

cancelled

47

customer account

ATM Machine

withdraw

balance enFuiry

bank manager

checking account

saving account

(1231454+ Diagram:

(omponent diagram:A !ample component file!

48

indeK$html

@arallel %ort$eKe

i%ut35$dll

cmd$eKe

Deployement diagram:

Atm machine location DA

console Atm machine location b bank server

Case Stu ! 6: ce&&u&ar %)o'e s!ste*

49

Problem statement: &he cellular networ# must place the phone call currently,and also schedule the receiving and conference calls. Usecase #a2ra*:

Cellular system Isdn Call

GGBenerali4ationHH Local Call GGBenerali4ationHH GGBenerali4ationHH T1 Call GGusesHH GGusesHH GGusesHH

GGusesHH Call Connect GGusesHH Call is dro% after it is connected GGeKtendHH Message evices GGusesHH Call 1ro% Miscellaneos GGusesHH GGusesHH GGusesHH ervices GGusesHH

GGusesHH M B 1elivery M B ending B@R >A@ Other

C&ass #a2ra*:

50

subscriber name adrdress make a call'(

tele%hone line tele%hone no * *$$n *$$n .$$n

* )*

o%erator

chek bill'( register new sub scriber'(

.$$n Organi4ation business registration no$ call callee number date start time end time call details'(

individual I1

se+%en(e "!a$ram

51

ubscriber 0 am%leModel

Tele%hone line

call control

0call

lift tele%hone receiver reFuest number

dial number dial number

start call create re%lace tele%hone receiver end call set end time

collaboration diagram
call control Tele%hone line

60 dial number 70 start call :0 end call 80 create ;0 set end time *0 lift tele%hone receiver 30 dial number 90 re%lace tele%hone receiver 0call

50 reFuest number

ubscriber 0 am%leModel

52

)+A+5 D,A67A2

initial state

idle

on hook

dial on hook talk busy ready to dial

busy connecting ringing destination altered

53

Timeout

GAfter *7 secH Idle 1ialTone GdialH

G1ial digitH 1ialing

Gdial invalidH G tartH Invalid

G1ial /alidH Connecting

Toling GbusyH GCalle Lung u%H Toling5 Busy Ringing GAvailableH

54

Lift tele%hone receiver

wait for dial tone

dial number

<answered= <busy or no one answers=

talk

re%lace tele%hone receiver

ACTIVIT

diagram for elaboration of ma!e a call

55

Co*%o'e't #a2ra*

Tele%hone billingB!I

call controlor Billing db server

0O@&RATOR@C

0Tele%hone swith Interface@C

0 erver@C

DEPLOYMENT DIAGRAM

56

Case st%"& ,: Tra"!n$ S&stem Problem statement: T#e tra"!n$ s&stem m%st ta*e (are o sales !n ormat!on o t#e (om'an& an" m%st anal&-e t#e 'otent!al o t#e tra"e. Usecase #a2ra*:
Trading ystem

@laces Order !ser Order O%erates Order GGBenerali4ationHH GGBenerali4ationHH GGincludeHH GGincludeHH O%erator /alidation Instant Order ,uture Order GGusesHH GGusesHH 1elivery

GGincludeHH GGincludeHH

Center 1elivery

Lome 1elivery

GGincludeHH Check @assword GGincludeHH

Check Availability @lace Order Trace Order

57

C&ass #a2ra*:
customer number name address * reFuest'( receive'( *$$n supplies *$$n %roduct number name colour unit %rice for *$$n * * stored in ware house city %hone number add'( delete'(

places *$$n

order number date ty%e *

contains *$$n orderline number Futy name

*$$n

58

Se7ue'ce #a2ra*:
customer clerk su%%lier warehouse

%lace order'( chek %roduct

reFuest stock

%roduct available'(

deliver %roduct

collaboration diagram

59

70 deliver %roduct clerk *0 %lace order'( 50 chek %roduct 60 %roduct available'( customer

su%%lier

warehouse 30 reFuest stock

ACTI/ITY DIAGRAM FOR TRADING SYSTEM

customer sends an order reFuest

order reFuestQ system confirms the recei%t of $$$

no

if order is normalM

yes

confirm the order

order is s%ecialM yes dis%atch the order no

STATE TRANSITION DIAGRAM FOR TRADING SYSTEM

60

Idle

send order reFuest

normal Fuit

select normal or s%ecial order

confirm event failures order confirmation

com%lete transaction

dia%atch order

COMPONENT DIAGRAM

%urchase

reorder check

stock balance

receive order

%lace order

DEPLOYMENT DIAGRAM:

61

OR1&R

C! TOM&R

1ATABA & &R/&R

62

Potrebbero piacerti anche