Você está na página 1de 132

Roll No:_____________________ OOAD LAB

INDEX
1. Unified modeling language
2
2. Use case Introduction
8
3. Use case diagram
a. Use case of ATM machine 10
b. Use case of Library management 11
c. Use case of Railway Reservation System
12
4. Class introduction 13
5. Class diagram
a. Class diagram of collage management system
16
b. Class diagram of Hospital Management system
17
c. Class diagram of Library management system
18
6. Interactive diagram Introduction 19
7. Interactive diagram
a. Interactive diagram for ATM machine 22
b. Interactive diagram for Library Management system
23
c. Interactive diagram for Railway Reservation system 24
8. Collaboration introduction 25
9. Collaboration diagram
a. Collaboration diagram for ATM machine
26
b. Collaboration diagram for Library machine 27
c. Collaboration diagram for Railway Reservation machine
28
10.State machine diagram 30
11.State chart diagram for CD player 32
12.Activity diagram introduction 33
13.Activity diagram
a. Activity diagram of ATM without swinlanes 35
b. Activity diagram of ATM with swinlanes
36
14.Component diagram introduction 37
15.Component diagrams
a. Component diagram for ATM System 41
b. Component diagram for Hospital Management System
42
16.Deployment diagram 43
17.Deployment diagram for ATM system 44
18.Forward engineering 45
19.Reverse engineering 54
20.Case study
a. Bank ATM System 61
b. Cellular phone Network 69
c. Student course registration system 79
d. Hospital Management System 88

Kakatiya Institute of Technology and Science Page 1


Roll No:_____________________ OOAD LAB

e. Library Information system 97


f. Ticket vending system
107
g. Trading system
115

1 UNIFIED MODELING LANGUAGE


UML is a graphical notation used to visualize, specify,
construct and document the artifact of software intensive.

UML is appropriate for modeling systems ranging from


Enterprise Information Systems to Distributed Web-based
Application and even to Hard Real-time Embedded systems.

UML effectively starts with forming a conceptual modeling


of the language.

There are 2 types of diagrams. They are,

1. Static Diagrams
a) Use case diagrams
b) Class diagrams
c) Object diagrams
d) Component diagrams
e) Deployment diagrams
1. Dynamic diagrams
a) Interaction diagrams
i) Sequence diagrams
ii) Collaboration diagrams
a) State machine diagrams
i) State chart diagrams
ii) Activity diagrams

Applications of UML:

UML is intended primarily for software intensive systems. It


has been used effectively for such domains as
Kakatiya Institute of Technology and Science Page 2
Roll No:_____________________ OOAD LAB

1. Enterprise Information Systems


2. Banking and Financial Services
3. Telecommunications
4. Transportation
5. Defense and Aerospace
6. Retail
7. Medical Electronics
8. Scientific
9. Distributed Web-based Services

Basic building blocks of UML:

The building blocks of UML can be categorized as

1. Things
2. Relationships and
3. Diagrams

Things:-

Things are the most important building blocks of UML.


Things can be

a) Structural
b) Behavioral
c) Grouping
d) Annotational

a) Structural Things: They define the static part of the model.


They represent physical and conceptual elements.
Following are the structural things –
1. Class: - It describes a set of objects that share the
same attribute
operations, relationships and semantics.
Class name

Attributes

Operations

Kakatiya Institute of Technology and Science Page 3


Roll No:_____________________ OOAD LAB

2.Object: - It is a collection of operations that specifies


a service of a class or a component.

3. Collaboration: - It defines interaction between


elements.

1. Use case: - They are used to identify different use


case components of a particular software project. It is
used to model the operation.

2. Component: - It is a physical and replaceable part


that confirms to and provides realization of set of
interfaces.

3. Node: - A physical resource that exists in runtime and


represent a computational resource.

Kakatiya Institute of Technology and Science Page 4


Roll No:_____________________ OOAD LAB

4. Actor: - The out side entity that communicates with a


system. Typically a person playing a role on an
external device.

a) Behavioral Things: They consist of dynamic parts of the


UML model.
The following are behavioral things –
1. Interaction: - It is defined as a behavior that consists
of a group of message exchanged among elements to
accomplish a specific task.
message

2. State machine: - It is useful when the states of an


object in its life cycle. It defines the sequence of
states and object goes through in response to events.

a) Grouping Things: They can be defined as a mechanism to


group elements of UML model together. There is only one
grouping thing available i.e., Package.
Package is used for gathering structural and behavioral
things.

Kakatiya Institute of Technology and Science Page 5


Roll No:_____________________ OOAD LAB

b) Annotational Things: - They can be defined as a mechanism


to capture remarks, description and comments of UML
model elements. There is only one annotational thing
available i.e., Note.
Note is used to render comments, constraints and so
on of a UML element.

Relationships: -

The relationship is another most important building


block of UML. They show how elements are associated with
each other and their association describes the functionality
of application.
There are 5 types of relationships. They are,
1. Dependency: It is a relationship between two things in
which change in one element also affects another.

2. Generalization: It can be defined as a relationship


which connects a specialized element with a
generalized element. It basically describes inheritance
relationship in the object. It is a ‘is_a ‘ hierarchy.

Kakatiya Institute of Technology and Science Page 6


Roll No:_____________________ OOAD LAB

3. Realization: It 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 implement then. This relationship exists in
case of interfaces.

4. Association: It is a set of links that connects elements


of an UML model. Two types of associations –
a) Unidirectional
b) Bidirectional
c)
1. Aggregation: It is a ‘has_a’ relationship. It is of two
types as -

a) Simple aggregation

b) Composition aggregation

UML Diagrams: -

1. Class diagram
2. Use case diagram
3. Interaction diagram
i) Sequence diagram
ii) Collaboration diagram
1. State machine diagram
i) State chart diagram
ii) Activity diagram
1. Component diagram
2. Deployment diagram

Kakatiya Institute of Technology and Science Page 7


Roll No:_____________________ OOAD LAB

2. USE CASE DIAGRAMS

A use case diagram describes a set of sequences in


which each sequence indicates the relation with outside
things. A use case involves the interaction of actor and
system. There exist 3 types of relationships-
1. Association
2. Dependency
3. Generalization
Use case diagrams can contain
Actors – “things” outside the system
Use cases – system boundaries identifying what the
system should do.

Kakatiya Institute of Technology and Science Page 8


Roll No:_____________________ OOAD LAB

Use case diagram can be used during analysis to


capture the system requirements and to understand how the
system should work. During the design phase, you can use use-
case diagrams to specify the behavior of the system as
implemented.

Actor:-

Actor represents system users. They help delimit the


system requirements and give a clearer picture of what the
system should do.

An actor is someone or something that

• Interacts with or uses the system.


• Provides input to and receives information from the
system.
• Is external to the system and has no control over the use
cases.

Customer (actor)

 Actors are discovered by examining,

• Who directly uses the system


• Who is responsible for maintaining the system?
• External hardware used by the system.
• Other systems that need to interact with the system.

Use case: -

A use case can be described as a specific way of using


the system from users (actors) perspective.

Use case can be characterized as-

• A pattern of behavior the system exhibits.


• A sequence of related transactions performed by an actor
and the system.

Kakatiya Institute of Technology and Science Page 9


Roll No:_____________________ OOAD LAB

• Delivering something of value to the actor.

Transfer Funds

Note: Use cases often start with a “verb”.

Use cases provide a means to,

• Capture system requirements.


• Communicate with end users and domain experts.
• Test the system.

3.1Use Case for ATM Machine

Kakatiya Institute of Technology and Science Page 10


Roll No:_____________________ OOAD LAB

c han ge pas s w o rd

W ith dra w m one y

D at aba s e s e rver
C u s t om er

C h ec k ba lan c e

Tak e m in i s ta t em ent

Fig: Use case diagram for ATM System

Kakatiya Institute of Technology and Science Page 11


Roll No:_____________________ OOAD LAB

3.2Class diagram for Library Management


System

search books

Issue books

Person
Librarian

Renew books

Student Staff

Pay fine

Return books

Fig: Use case diagram for Library Management


System

Kakatiya Institute of Technology and Science Page 12


Roll No:_____________________ OOAD LAB

3.3Class diagram for Railway Reservation System

E n q u ir y C h e c k in g

R e s e rva t io n

T r a i n s c h e d Bu leer t h a v a il a b i fa
li t rye s

P ay m oney

P assenger t ic k e t Is s u e r

Is s u e t ic k e t

C o n fi r m a t io n o f t ic k e t

C a n c e lla t io n o f t ic k e t

Fig: Use case diagram for Railway Reservation


System

Kakatiya Institute of Technology and Science Page 13


Roll No:_____________________ OOAD LAB

4.CLASS DIAGRAMS

The class diagram contains icons representing classes,


interfaces and their relationships.

Class:-

A class is a set of objects that share a common structure


and common behavior (the same attributes, operations and
semantics).

A class is a abstraction of real-world items. When these


items exist in the real-world, they are instances of the class and
are referred to as objects.

A class icon is a 3-part box.


Class name

Attributes

Operations

1. Generalize relationship for classes: It shows that sub


classes share the structure or behavior defined in one or
more super classes. Use a generalize relationship to show
“is_a” relationship.

Super
class

Sub class 1 Sub class2

Kakatiya Institute of Technology and Science Page 14


Roll No:_____________________ OOAD LAB

2. Dependency Relationship: The dependency is a


relationship between two model elements in which change
in one element will affect the other model element.
Typically on class diagrams, a dependency relationship
indicates that the operations of the client invoke operation
of the supplier.

Cardinality Adornment:- Cardinality specifies how many


instances of one class may be associated with single
instance of other class.
When you apply a cardinality adornment to a class, you
are indicating number of instances allowed for that class.
A relationship, you are indicating number of links allowed
between one instance of a class and the instances of
another class.
Valid Values:
Value Description
0..0 zero
0..1 zero or one
0..n zero or more
1..1 one
1..n one or more
n unlimited number

Interface:-An interface specifies the externally visible


operations of a class and/or component, and has no
implementation of its own. An interface specifies only a
limited part of behavior of class or a component.

3. Association relationship: An association provides a


pathway of communications. The communication can be
between use cases, actors, classes or interfaces. If two
classes are usually considered independently, the
relationship is an association.

Kakatiya Institute of Technology and Science Page 15


Roll No:_____________________ OOAD LAB

Unidirectional Bi directional

An association is an orthogonal or straight solid line with


an arrow at one end.

Customer Transfer funds

4. Aggregate relationship: Use the aggregate relationship to


show a whole or part relationship between two classes.

Unidirectional aggregation Bidirectional


aggregation
The diamond end designates the client class.
Supplier
A Suppler B
Client

Kakatiya Institute of Technology and Science Page 16


Roll No:_____________________ OOAD LAB

5.1Class diagram for Collage Management


System

Kakatiya Institute of Technology and Science Page 17


Roll No:_____________________ OOAD LAB

N o n t e a c hin g s ta ff
C o lle g e
n a m e : s t rin g
n a m e : s t rin g
* Q u a lific a t io n : s t rin g
lo c a t io n : s t rin1g
*
A d d s tu d e n t () *
1 1
re m o ve s tu d e n t()
a d d d e p ()
D e p a rt m e n t
re m d e p t() 1
a d d s t a ff() D e p t n u m : in t
re m s t a ff() D e p t n a m e : s t rin g
* L o c a tio n : s trin g
1 1 1
A d d s u b je c t ()
L ib ra ry
* 1 R e m o ve s u b je c t ()
* B o o k id : in t
T& P s e c t io n 1 .. *
1
s tu d _ id : in t
Is s u e ()
s tu d _ n a m e : s t rin g
re n e w a l()
B ra n c h : s trin g
C o lle c t fin e () *
c o m p a n y n a m e : s trin g
c o llec t b o o k s ()
1
R e c ru itm e n t ()

* *
*
s tu d e n t *
id : in t L e c tu re r
*
n a m e : s t rin g S u b je c t n a m e : s t rin g
B ra n c h : s trin g id : in t D e s ig n a tio n : s trin g
n a m e : s t rin g D e p t id : in t
* * 1 *
E n ro llm en t ()
A t te n d c la s s e s () T e a c hin g ()
A t te n d E x a m s ()

Fig: Class diagram for College


Management System

Kakatiya Institute of Technology and Science Page 18


Roll No:_____________________ OOAD LAB

5.2Class diagram for Hospital Management


System

M e d ic a l s t o re
m e d ic in e n a m e : s tr in g
* m e d ic in e c o s t : in t

s u p p ly m e d ic in e s ()
H o s p it a l 1
1
N a m e : s t rin g
L o c a t io n : s t r in g D e p a rt m e n t
1
* D e p t n u m : in t
m a in t a in d o c t o r re c o r d s ( ) D e p t n a m e : s t rin g
1
m a in t a in p a t ie n t r e c o r d s () L o c a t io n : s t r in g
m a i n t a i n s t a ff r e1 c o r d s ( )
1 < < > m a in ta in d o c t o r re c o rd s ()
1

D o c to rs * * *
*
N a m e : s t r in g P a t ie n t s
S p e c i a l i z a t i o n : s t r iTn rge a t m e n t O t h e r s t a ff
N a m e : s t r in g
d is e a s e t y p e : s t r in g n a m e : s t r in g
c o n s u lt in g d o c n a m e : s t r in g
p e r f g e n e r a l c h e c tkr eu ap tsm( ) e n t : s t r i n g D e s ig n a t io n : s t rin g
* * * * * *
p re s m e d ic i n e ( )
B ill p a y m e n t()
p re s te s t s ()
p e rf s u g e ry ()

N u rs e s L a b t e h n ic ia n s
S u r g e o nPs h y s i c i a Inn st e r n s In p a t i e n t O u t p a t i e n t

Fig: Class diagram for Hospital Management


System

Kakatiya Institute of Technology and Science Page 19


Roll No:_____________________ OOAD LAB

5.3Class diagram for Library Management


System

L ib ra ry
N a m e : s trin g
L oc a tio n : s trin g

Is s u e c a rd s () B oo k s
m a in ta in b o ok d e ta1ils () B o o k id : in t
1 1 * Title : s trin g
1
A u tho r : s trin g
L ibra ry a d m in 1
Id : in t
N a m e : s trin g

M an a ge s lib rary ()
1

* *
* L ib rarian
O p eration U s er
Id : in t
B oo k id : in t id : in t
N am e : s tring
N am e : s trin g
is s u e ()
Is s u e b oo k s ()
1 * ren ew a l() * 1 Tak e b ook s ()
ren ew a l()
return() p ay fine ()
c o llec t fin e ()
fin e() ret urn b oo k s ()
c o llec t b o ok s ()

s tu den t F a c u lty

Fig: Class diagram for Library Management


System

Kakatiya Institute of Technology and Science Page 20


Roll No:_____________________ OOAD LAB

6.INTERACTION DIAGRAMS

An interaction is an important sequence of interactions


between objects. There are two types of interaction diagrams,

a) Sequence Diagrams.
b) Collaboration diagrams.
1. Sequence Diagrams: A sequence diagram is a graphical
view of a scenario that shows object interaction in a time
based sequence, what happens first, what happens next.

Sequence diagrams establish the roles of objects and help


provide essential information to determine class
responsibilities and interfaces.

A sequence diagram has two dimensions: vertical


placement represents time and horizontal placement
represents different objects.

Link: Objects interact through their links to other objects. A


link is an instance of an association, analogous to an object
being instance of a class.

A link should exist between two objects, including class


utilities, only if there is a relationship between their
corresponding classes.

Kakatiya Institute of Technology and Science Page 21


Roll No:_____________________ OOAD LAB

Message icons: A message icon represents the


communication between objects indicating that an action
will follow.

The message icon is a horizontal, solid arrow connecting


two lifelines together.

A message icon in a sequence diagram represents exactly


one message.

Lifeline: Each object appearing on the sequence diagram


contains a dashed vertical line, called lifeline, which
represents the location of an object at a particular point in
time.

The lifeline also serves as a place for messages to start


and stop and a place for the focus of control to reside.

Lifeline

Message or Event: a message is a communication carried


between two objects that trigger an event. A message is

Kakatiya Institute of Technology and Science Page 22


Roll No:_____________________ OOAD LAB

represented in collaboration and sequence diagrams by a


message icon which usually indicates its synchronization.

Synchronization types that are supported.

1. Simple
2. Synchronous
3. Balking
4. Time out
5. Asynchronous
6. Procedure call
7. Return

Message to self: It is a tool that sends a message from one


object back to the same object. The sender of the message is
same as the receiver.

Tools:

1. Object

2. Object message

3. Message to self

Kakatiya Institute of Technology and Science Page 23


Roll No:_____________________ OOAD LAB

4. Return message

5. Destruction marker

7.1 Sequence diagram for ATM System

Kakatiya Institute of Technology and Science Page 24


Roll No:_____________________ OOAD LAB

User ATM Database


server
1: Insert atm card

2: Check card

3: Invalid:Insert card properly

4: Valid:Display enter pin number

5: Enter pin number

6: Check pin number

7: Valid/Invalid

8: Invalid:Re enter pin number

9: Valid:displays Menu

10: Select withdraw option from menu

11: Enter with draw amount

12: Check for available balance

13: Available/Not

14: Not: Displays menu balance not available

15: Available:Transaction performed

16: Do u want to continue transactions?

17: Close transaction

Fig: Sequence diagram for ATM System

7.2 Sequence diagram for Collage information System

Kakatiya Institute of Technology and Science Page 25


Roll No:_____________________ OOAD LAB

User Library Librarian Database

1: Search for required book

2: Available/not

3: Available:Takes books

4: Not:Leaves Library

5: Gives ID card for issue of book

6: Checks for validation

7: Valid/Not

8: Invalid:Does not issue

9: Valid:Issue Books

10: Updates Database

11: Renewal of books

12: Checks fine amount

13: Pays fine

14: Updates database

15: Renews books

16: Returns books

17: checks fine amount

18: Pays fine

19: Updates database

20: Books added back

Fig: Sequence diagram Library Management


System

Kakatiya Institute of Technology and Science Page 26


Roll No:_____________________ OOAD LAB

7.3 Sequence diagram for Railway Reservation System

Passenger Reservation database


counter
1: Enquiry about train

2: Check for availability

3: Available:Yes/No

4: No:End enquiry

5: yes:Tells the details of train

6: Pay money for ticket

7: Issues ticket

8: Updates Database

9: Confirms Reservation

10: Cancellation of ticket

11: Updates database

Fig: Sequence diagram for Railway


Reservation System

Kakatiya Institute of Technology and Science Page 27


Roll No:_____________________ OOAD LAB

8.Collaboration diagrams:- A collaboration diagram is an


interaction diagram that shows the order of messages that
implement an operation or a transaction.

Collaboration diagrams show objects, their links, and


their messages. They can also contain simple class instances
and class utility instances.

Each collaboration diagram provides a view of the


interactions or structural relationships that occur between
objects and object-like entities in the current model.

Collaboration diagrams contain icons representing objects.

The “Create Collaboration Diagram” Command creates a


collaboration diagram from information contained in the
sequence diagram.

The “Create Sequence Diagram” Command creates a


sequence diagram from information contained in the
interaction's collaboration diagram.

The “Goto Sequence Diagram” and “Goto Collaboration


Diagram” commands traverse between an interaction's two
representations.

Kakatiya Institute of Technology and Science Page 28


Roll No:_____________________ OOAD LAB

1.1. Collaborative diagram for ATM System

2 : C h e c k c a rd
1 6 : D o u w a n t t o c o n t in u e t r a n s a c t i o n s ?
1 : In s e r t a t m c a r d
5 : E n t e r p in n u m b e r
1 0 : S e le c t w i t h d r a w o p t i o n fr o m m e n u
1 1 : E n t e r w it h d ra w a m o u n t
1 7 : C l o s e t r a n s a c t io n
User A TM

1 5 : A v a il a b l e : T r a n s a c t i o n p e r fo r m e d 6 : C h e c k p in n u m b e r
1 4 : N o t : D is p l a y s m e n u b a la n c e n o t 1a2v:a Cil ahbel ce k fo r a v a i l a b l e b a la n c e
9 : V a l i d : d i s p l a y s 1M 3e: nAu v a ila b l e / N o t
8 : In v a l i d : R e e n t e r p in7 : nVuamli db /eInr v a l i d
4 : V a li d : D i s p l a y e n t e r p i n n u m b e r
3 : In v a li d : In s e r t c a r d p r o p e r ly

D a tab a s e
s e rve r

Fig: Collaboration diagram for ATM System

Kakatiya Institute of Technology and Science Page 29


Roll No:_____________________ OOAD LAB

1.2. Collaborative diagram for Library Management


System

2: A va ila b le / n o t

1 : S e a rc h fo r re q u ire d b o o k
3 : A va ila b le : Ta k es b o ok s
4 : N o t: L e a ve s Lib ra ry
Us er L ib ra ry

5 : G ive s ID c a rd for is s ue o f b oo k
11: Renewal of book s
1 3 : P a y s fin e
1 6 : R e tu rn s b o o k s 2 0 : B o o k s a d d e d b a c k
1 8 : P a y s fin e
15: Renews book s
9 : V a lid :Is s u e B o ok s 6 : C h e c k s fo r va lida t io n
8 : In va lid : D o e s n o t is s u e 1 0 : U p d a te s D at a b a s e
1 2 : C h e c k s fin e a m o u nt
1 4: U p d a te s d a t a bas e
1 7 : c h ec k s fin e a m o u n t
1 9: U p d a te s d a t a bas e
D a t ab a s
L ib raria n
e
7 : V a lid /N o t

Fig: Collaboration diagram for Library management


System

Kakatiya Institute of Technology and Science Page 30


Roll No:_____________________ OOAD LAB

1.3. Collaborative diagram for railway Reservation


System

1 : E n q u iry a b o u t t ra in
6 : P a y m o n e y fo r t ic k e t
9 : C o n firm s R e s e rva t i o n
1 0 : C a n c e lla t io n o f t ic k e t
P as s enger R e s e rva t io n
c o u n te r
4 : N o : E n d e n q u iry
5 : y e s : T e lls t h e d e t a il s o f t ra in
7 : Is s u e s t ic k e t
2 : C h e c k fo r a va il a b ilit y
8 : U p d a te s D a ta b a s e
3 : A va ila b le : Y e s / N o1 1 : U p d a t e s d a t a b a s e

d a ta b a s e

Fig: collaboration diagram for Railway Reservation


System

Kakatiya Institute of Technology and Science Page 31


Roll No:_____________________ OOAD LAB

2. STATE-MACHINE DIAGRAMS

There are two types of state-machine diagrams:


1. State chart diagram
2. Activity diagram
1. State chart diagram: state chart diagrams model the
dynamic behavior of individual classes or any other kind of
object.
They show the sequence of states that an object goes
through the events that cause a transition from one state
to another and the actions that result from a state change.
A state chart diagram is typically used to model the
discrete stages of an objects lifetime.
A state chart diagram typically contains one start state
and multiple end states.
1. State :- A state represents a condition or situation during
the life of an object during which it satisfies some
condition or waits for an event. Each state represents a
cumulative history of its behavior.
States can be shared between state machines.
Transitions cannot be shared.

Naming: The name of the state must be unique to its


enclosing class,

within the state.

Kakatiya Institute of Technology and Science Page 32


Roll No:_____________________ OOAD LAB

Actions: Actions on states can occur at one of four


times

• On entry
• On exit
• Do
• On event
1. Start state:- A start state (also called an “initial state”)
explicitly shows the beginning of the execution of the
state machine on the state chart diagram or beginning of
the workflow on an activity diagram.
Normally, one outgoing transition can be placed from the
start state.
However, multiple transitions may be placed on start
state, if at least one of them is labeled with a condition. No
incoming transitions are allowed.
The start state icon is a small, filled circle that may
contain the name (Begin process).

Begin process
2. End state:- An end state represents a final or terminal
state on an activity or state chart diagram..
Transitions can only occur into an end state.
The end state icon is a filled circle inside a slightly larger
unfilled circle that may contain the name (End process).

End process
3. State transition:- A state transition indicates that an action
in the source state will perform certain specified actions
and enter the destination state when a specified event
occurs or when certain conditions are satisfied.
A state transition is a relation ship between two states,
two activities or between an activity or a state.
The icon for a state transition is a line with an arrow head
pointing toward the destination state or activity.

Kakatiya Institute of Technology and Science Page 33


Roll No:_____________________ OOAD LAB

We can show one or more state transitions from a state as


long as each transition is unique. Transitions originating
from a state cannot have the same event, unless there are
conditions on the event.
Naming: We should label each state transition with the
name of at least one event that causes the state
transition. We do not have to use unique labels for the
state transitions because the same event can cause a
transition to many different states or activities.

Tools:
1. State

2. Activity

3. Start state

4. End state

5. State transition

6. Transition to self

Kakatiya Institute of Technology and Science Page 34


Roll No:_____________________ OOAD LAB

7. Horizontal synchronization

8. Vertical synchronization

9. Decision

10. Swimlanes

11.1. State chart diagram for CD Player

Kakatiya Institute of Technology and Science Page 35


Roll No:_____________________ OOAD LAB

power on

open

Insert disk

Select a
song

play

Rewind Forward Pause Resume


song

Stop

Fig: State chart diagram for CD Player

12.Activity diagram:- An activity diagram is a special


case of state diagram. An activity diagram is like a flow

Kakatiya Institute of Technology and Science Page 36


Roll No:_____________________ OOAD LAB

chart showing the flow a control from one activity to


another.

An activity diagram is used to model dynamic aspect of


the system.
Activity diagram contains:
1. Activity states and action states
2. Transition
3. Object
Action state:- These are atomic, executable
computation which represents the execution of an
action.

Activity state:- They can be decomposed. That is, their


activity is represented by other activity diagrams.

Branching:- In branching, we have one incoming


transition and two or more outgoing transitions.

Decision

Forking and Joining:-


Forking:- It is a process of splitting a single flow of
control into multiple flow of controls. Generally a fork
has a single incoming flow of control but multi outgoing
flow of control.

Joining:- It is exactly opposite of forking. It generally has


multiple incoming flows of control but single outgoing
flow of control.

Kakatiya Institute of Technology and Science Page 37


Roll No:_____________________ OOAD LAB

Swim-lanes:- They represent the columns in the activity


diagram to group the related activities. These are
represented in the form of partitioned region.
Swim-lanes are helpful when modeling a business work
flow because they can represent organizational units or
role with in a business model. Swim-lanes are very
similar to an object because they provide a way to tell
who is performing a certain role.

Kakatiya Institute of Technology and Science Page 38


Roll No:_____________________ OOAD LAB

13.1. Activity diagram for ATM System without


swimlanes

Kakatiya Institute of Technology and Science Page 39


Roll No:_____________________ OOAD LAB

Insert card

Enter pin
number

Invalid
Check pin
number.
Valid

Select any
transaction

Perform
Transaction

Yes
End
Transaction

Do u want to continue
transactions?

No

Remove card

Fig: Activity diagram for ATM System without


swimlanes

Kakatiya Institute of Technology and Science Page 40


Roll No:_____________________ OOAD LAB

13.2. Activity diagram for ATM System with


swimlanes

Customer Bank system

Insert card

Enter pin Verify pin


number number

Check pin
Invalid number

Select any
transaction Valid

Perform
Transaction

End
Transaction

Yes
DO U want to continue
Transaction?
Remove card
No

Fig: Activity diagram for ATM System with Swimlanes

Kakatiya Institute of Technology and Science Page 41


Roll No:_____________________ OOAD LAB

14. COMPONENT DIAGRAMS


They provide a physical view of the current model. A
component diagram shows the organizations and
dependencies among software components, including
source code component, binary code component, and
executable component.
These diagrams also show the externally visible
behavior of the component by displaying the interfaces
of the components.
Component diagrams contain:
1. Component package
2. Components
3. Interfaces
4. Dependency relationship
1. Component package:- component package
represents clusters of logically related
components, or major pieces of our system.
Component packages parallel the role played by
logical packages for class diagrams. They allow us
to partition the physical model of the system.
Typically, a component package name is the name
of a file system directory.
The component package is a folder shaped icon.

2. Components:- A component represents a software


module (source code, binary code, executable, dll,
etc.) with a well-defined interfaces.
The interfaces of the component are represented
by one or several interfaces elements that the
component provides.
Components are used to show the compiler and
runtime dependencies as well as interface and
calling dependencies among software modules.
Kakatiya Institute of Technology and Science Page 42
Roll No:_____________________ OOAD LAB

Interface circle attached to the component icon


means that the component supports that particular
interface.
Component stereotypes:- A system may be
composed of several software modules of different
kinds (.exe files, .dll files etc). To distinguish
different kinds of software modules from each
other, component stereotypes are used.
By default, the following stereotypes types of
components are available.
a) Main program
b) Sub program
c) Packages
d) Tasks
e) EXE
f) DLL

a) Package:- A software component of the type


package consists of a specification module
and an implementation module; the
implementation module often referred to as
body. By default, a class is declared in a
package.

b) DLL:- A dll component stereotype represents


a data link library (a .dll file).

Kakatiya Institute of Technology and Science Page 43


Roll No:_____________________ OOAD LAB

c) Main program:- This component represents a


file that contains the root of the program.
There is only one main program component
per program.

d) Sub program:- Sub program components


corresponds to sub routine declarations.
Sub programs generally contain single or
grouped sub routines; they do not contain
class definitions.

e) Task:- Task components represents package


with independent thread of control. If task are
compiled differently than regular packages,
we can allocate a class definition to a task.

Kakatiya Institute of Technology and Science Page 44


Roll No:_____________________ OOAD LAB

f) EXE:- A component of the type EXE


represents executable(.exe file).

1. Interface:- An interface specifies the externally-


visible operations of a class or component and has
no implementation of its own. An interface
typically specifies only a limited part of behavior of
a class or component.
Interfaces belonging to the logical view but
can occur in class, use case and component
diagram.

2. Dependency relationship:- A dependency


relationship between two model elements in which
a change to one model element will affect the
other model element.
Use a dependency relationship to connect model
elements with the same level of meaning.

Kakatiya Institute of Technology and Science Page 45


Roll No:_____________________ OOAD LAB

15.1. Component Diagram for ATM System

Kakatiya Institute of Technology and Science Page 46


Roll No:_____________________ OOAD LAB

A TM

A TM Tra ns ac tion . h file


. ex e file

c h an ge pw dB al en quiryW it hdra w l Ta k e m ini s t a tem en t


da tab as e

Fig: Component Diagram for ATM System

15.2. Component diagram for Hospital


Management System

Kakatiya Institute of Technology and Science Page 47


Roll No:_____________________ OOAD LAB

H o s p it a l

. e x e fil e . h fi le
D o c to r D e p a r t m e n t P a t ie n t s
M e d ic a l s t o re

D a tab a s e

g e n e r a l c h ep ce kr fou pr m s up rrge es rcy r ib e pt er es st sc r ib e m e d i c i n e s


m a i n t a in d o c r eBc i ol l r pd as y m eS nu t p p l y m e d i c i n e s

Fig: Component diagram for Hospital


Management System

16. DEPLOYMENT DIAGRAM

Kakatiya Institute of Technology and Science Page 48


Roll No:_____________________ OOAD LAB

A deployment diagram shows processors, devices and


connections. Each model contains a single deployment diagram
which shows the connections between its processors and
devices and its processes to processors.
Processor:- A processor is a hardware component capable of
executing programs. Each processor must have a name, there
are no constraints on the processor name because processors
denote hardware rather than software entities.
The icon for processor is a shaded box.

Device:- A device is a hardware component with no computing


power. Each device must have a name. Device names can be
generic, such as “modem” or “terminal”.
The icon of device is a box.

Connection:- A connection represents some type of hardware


coupling between two entities. An entity is either a processor or
a device. The hardware coupling can be direct such as an
RS232 cable or indirect such as satellite-to-ground
communication. Connections are usually bidirectional.
The icon for connection is a straight line.

Kakatiya Institute of Technology and Science Page 49


Roll No:_____________________ OOAD LAB

17.1. Deployment diagram for ATM System

ATM Modem Server


Machine

ATM
card

Fig: Deployment diagram for ATM System

Kakatiya Institute of Technology and Science Page 50


Roll No:_____________________ OOAD LAB

18. FORWARD ENGINEERING

Forward engineering implies converting the models into


software code. This process is usually done by mapping.

Procedure:
1. First add “Rose C++”using AddIn->Addin manager”
2. select class diagram, goto Tools->C++->code generation
3. Again select class diagram, goto Tools->C++->Browser Header

Example-18.1:-

Student
Rollno : int
Name : char[20]
Branch : char[5]

Enrollment()
Attend classes()
Attend exams()

Output:-
Student.h

#ifndef Student_h
#define Student_h 1

class Student
{
public:
Student();

Student(const Student &right);

~Student();

Student & operator=(const Student &right);

int operator==(const Student &right) const;

Kakatiya Institute of Technology and Science Page 51


Roll No:_____________________ OOAD LAB

int operator!=(const Student &right) const;

void Enrollment ();

void Attend_classes ();

void Attend_exams ();

protected:

private:

const int get_Rollno () const;


void set_Rollno (int value);

const char* get_Name () const;


void set_Name (char* value);

const char* get_Branch () const;


void set_Branch (char* value);

private:
int Rollno;
char Name[20];
char Branch[5];

};

inline const int Student::get_Rollno () const


{
return Rollno;
}

inline void Student::set_Rollno (int value)


{
Rollno = value;
}

inline const char* Student::get_Name () const


{
return Name;
}

inline void Student::set_Name (char* value)


{
Name = value;
}

inline const char* Student::get_Branch () const


{
return Branch;
}

inline void Student::set_Branch (char* value)


{
Branch = value;
}

Kakatiya Institute of Technology and Science Page 52


Roll No:_____________________ OOAD LAB

#endif

Example 18.2 :- Generalization

Staff
Id : int
Name : char[10]
Subject : char[10]
Dept Id : int

Teaching Staff Non Teaching Staff

Teaching() Cleaning()
Incharge()

Output:-
Staff.h

#ifndef Staff_h
#define Staff_h 1

class Staff
{
public:
Staff();

Staff(const Staff &right);


~Staff();
Staff & operator=(const Staff &right);

int operator==(const Staff &right) const;

int operator!=(const Staff &right) const;

protected:

private:

const int get_Id () const;


void set_Id (int value);

const char* get_Name () const;


void set_Name (char* value);

const char* get_Subject () const;


void set_Subject (char* value);

Kakatiya Institute of Technology and Science Page 53


Roll No:_____________________ OOAD LAB

const int get_Dept_Id () const;


void set_Dept_Id (int value);

private
int Id;
char Name[10];
char Subject[10];
int Dept_Id;
};

inline const int Staff::get_Id () const


{
return Id;
}

inline void Staff::set_Id (int value)


{
Id = value;
}

inline const char* Staff::get_Name () const


{
return Name;
}

inline void Staff::set_Name (char* value)


{
Name = value;
}

inline const char* Staff::get_Subject () const


{
return Subject;
}

inline void Staff::set_Subject (char* value)


{
Subject = value;
}

inline const int Staff::get_Dept_Id () const


{
return Dept_Id;
}

inline void Staff::set_Dept_Id (int value)


{
Dept_Id = value;
}
#endif

Teaching Staff.h

#ifndef Teaching_Staff_h
#define Teaching_Staff_h 1

#include " Staff.h"

class Teaching_Staff : public Staff

Kakatiya Institute of Technology and Science Page 54


Roll No:_____________________ OOAD LAB

{
public:
Teaching_Staff();

Teaching_Staff(const Teaching_Staff &right);

~Teaching_Staff();

Teaching_Staff & operator=(const Teaching_Staff &right);

int operator==(const Teaching_Staff &right) const;

int operator!=(const Teaching_Staff &right) const;

void Teaching ();


protected:
private:
private:
};
#endif

Non Teaching Staff.h

#ifndef Non_Teaching_Staff_h
#define Non_Teaching_Staff_h 1

#include " Staff.h"


#include "Teaching Staff.h"

class Non_Teaching_Staff : public Teaching_Staff,public Staff


{
public:

Non_Teaching_Staff();

Non_Teaching_Staff(const Non_Teaching_Staff &right);

~Non_Teaching_Staff();

Non_Teaching_Staff & operator=(const Non_Teaching_Staff &right);

int operator==(const Non_Teaching_Staff &right) const;

int operator!=(const Non_Teaching_Staff &right) const;

void Cleaning ();

void Incharge ();

protected:
private:
private
};

#endif

Kakatiya Institute of Technology and Science Page 55


Roll No:_____________________ OOAD LAB

Example 18.3: Aggregation:


E
R
C
B
IN
W
Radius : int
ra
u
n
h
o
g
rn
a
sm
te
si
n
u
e
a
n
d
tlrp
lc
sa
e
a
sn
r
(cta
(
m
)e
)
e
:
n
:
u
c
m
c
h
h
:a
ra
i[r
[
1
n
1
2
t0
]0
]

Output:

Car.h

#ifndef Car_h
#define Car_h 1

#include "Wheels.h"
#include "Engine.h"

class Car
{

public:
Car();

Car(const Car &right);

Kakatiya Institute of Technology and Science Page 56


Roll No:_____________________ OOAD LAB

~Car();

Car & operator=(const Car &right);

int operator==(const Car &right) const;

int operator!=(const Car &right) const;

const Engine get_the_Engine () const;


void set_the_Engine (Engine value);
const Wheels get_the_Wheels () const;
void set_the_Wheels (Wheels value);

protected:

private:

const char* get_Brand_name () const;


void set_Brand_name (char* value);

const char* get_Num_plate () const;


void set_Num_plate (char* value);

const int get_Insurance_num () const;


void set_Insurance_num (int value);

private:

char Brand_name[20];
char Num_plate[10];

int Insurance_num;
Engine the_Engine;

Wheels the_Wheels;

};

inline const char* Car::get_Brand_name () const


{
return Brand_name;
}

inline void Car::set_Brand_name (char* value)


{
Brand_name = value;
}

inline const char* Car::get_Num_plate () const


{
return Num_plate;
}

inline void Car::set_Num_plate (char* value)

Kakatiya Institute of Technology and Science Page 57


Roll No:_____________________ OOAD LAB

{
Num_plate = value;
}

inline const int Car::get_Insurance_num () const


{
return Insurance_num;
}

inline void Car::set_Insurance_num (int value)


{
Insurance_num = value;
}

inline const Engine Car::get_the_Engine () const


{
return the_Engine;
}

inline void Car::set_the_Engine (Engine value)


{
the_Engine = value;
}

inline const Wheels Car::get_the_Wheels () const


{
return the_Wheels;
}

inline void Car::set_the_Wheels (Wheels value)


{
the_Wheels = value;
}

#endif

Engine.h

#ifndef Engine_h
#define Engine_h 1

#include "Car.h"
class Engine
{

public:
Engine();

Engine(const Engine &right);

~Engine();

Engine & operator=(const Engine &right);

int operator==(const Engine &right) const;

Kakatiya Institute of Technology and Science Page 58


Roll No:_____________________ OOAD LAB

int operator!=(const Engine &right) const;

void Runs_car ();


const Car * get_the_Car () const;
void set_the_Car (Car * value);

protected:

private:

const char* get_Brand_name () const;


void set_Brand_name (char* value);
private:
char Brand_name[10];

Car *the_Car;
};

inline const char* Engine::get_Brand_name () const


{
return Brand_name;
}

inline void Engine::set_Brand_name (char* value)


{
Brand_name = value;
}

inline const Car * Engine::get_the_Car () const


{
return the_Car;
}

inline void Engine::set_the_Car (Car * value)


{
the_Car = value;
}

#endif

Wheels.h

#ifndef Wheels_h
#define Wheels_h 1

#include "Car.h"

class Wheels
{

Kakatiya Institute of Technology and Science Page 59


Roll No:_____________________ OOAD LAB

public:
Wheels();

Wheels(const Wheels &right);

~Wheels();

Wheels & operator=(const Wheels &right);

int operator==(const Wheels &right) const;

int operator!=(const Wheels &right) const;

void Rotates ();

const Car * get_the_Car () const;


void set_the_Car (Car * value);

protected:

private:

const int get_Radius () const;


void set_Radius (int value);

private:
int Radius;
Car *the_Car;
};

inline const int Wheels::get_Radius () const


{

return Radius;

inline void Wheels::set_Radius (int value)


{

Radius = value;

inline const Car * Wheels::get_the_Car () const


{

return the_Car;
}

inline void Wheels::set_the_Car (Car * value)


{

the_Car = value;
}

Kakatiya Institute of Technology and Science Page 60


Roll No:_____________________ OOAD LAB

#endif

19. REVERSE ENGINEERING

It involves converting the developed code into models.

Procedure:

1. Write the code in notepad. Save it in

C:/program files/Rational/Rose/C++/designs/”filename.cpp”

2. Tools->C++->Reverse engineering
3. File->new

Files->Rose (select filename then click add-selected

then select filename and click add-current, finally OK)

4. select filename and press F3(Action->Analyse) for


compilation.

Then press F8(Action->Export) for running then press OK.

5. Goto rational rose, File->open->path(C:/program


files/Rational/Rose/C++/designs)then click F8

Example 1:-

Class employee

Private:

Int id;

Char name[20];
Kakatiya Institute of Technology and Science Page 61
Roll No:_____________________ OOAD LAB

Public :

Getdata();

};

Perform 4 steps given in procedure

Then, we get output as-

employee
id : int
name : char [20]

Getdata()

Example 2:- Generalization

Class staff

Private:

Int id;

Name:char[20];

Public:

getdata();

};

Class tstaff:public staff

Kakatiya Institute of Technology and Science Page 62


Roll No:_____________________ OOAD LAB

Private:

Int x;

Public:

Putdata();

};

Class ntstaff:public staff

Private:

Int y;

Public:

Display();

};

Perform 4 steps given in procedure

Then, we get output as-

Output:-

Kakatiya Institute of Technology and Science Page 63


Roll No:_____________________ OOAD LAB

staff
id : int
name : char [20]

getdata()

ntstaff tstaff
y : int x : int

Display() Putdata()

Example3 :- Aggregation

Class car

Public:

Char brand_name[20];

Char num_plate[10];

Int ins_num;

Class Engine E;

Class Door D;

Class Wheel W;

};

Class Engine

Private: char br_type[10];

Public: void runs_car();

};

Kakatiya Institute of Technology and Science Page 64


Roll No:_____________________ OOAD LAB

Class Door

Public: void open();

Void close();

};

Class Wheel

Private :int Radius();

Public : Void Rotates();

};

Perform Above given 4 steps,

Then we get,

Output:

car
Engine
brand_name : char [20] +E
num_plate : char [10] br_type : char [10]
ins_num : int 1 1 runs_car()
D : Door

Wheel
+W
Radius : int
1
Rotates()

Kakatiya Institute of Technology and Science Page 65


Roll No:_____________________ OOAD LAB

CASE-STUDY

Kakatiya Institute of Technology and Science Page 66


Roll No:_____________________ OOAD LAB

CASE STUDY: BANK ATM SYSTEM


Problem statement

Each bank provides its own computer to maintain its own accounts and process transactions
against them. With this system, a client must first open account before he can use ATM. The
opening account involves the client providing his Personal information, and SSI. A client
may open one or more accounts for deposit ,withdraw, transfer money between checking and
saving account. The client can check the account status 24 hours a day.

When the client deposit/withdraw money. The client must specify which account and the
amount. Then ATMs communicate with a central computer which clears transactions with the
appropriate banks. An ATM accepts a cash card, interacts with the user, communicates with
the central system to carry out the transaction, dispenses cash, and prints receipts. The system
requires appropriate recordkeeping and security provisions. The system must handle
concurrent accesses to the same account correctly. The banks will provide their own software
for their own computers.

Functional Requirements
The functional requirements are organized in two sections; First requirements of the ATM
and second requirements of the bank computer.
* Requirements of the ATM
- authorization process
- transaction (withdrawal process)

* Requirements of the bank computer


- authorization process (bank code and password)
- transaction

Non-functional Requirement
The non-functional requirement is bellowed.
* The ATM network has to be available 24 hours a day.
* Each bank may be processing transactions from several ATMs at the same time.

Kakatiya Institute of Technology and Science Page 67


Roll No:_____________________ OOAD LAB

* The ATM must be able to use several data formats according to the data formats that are
provided by the database of different banks.

Usecase Diagram For Bank ATM System

System startup

Operator
System shutdown

Session

Invalid Pin
Customer
<<include>>
<<extend>>

Transaction Bank

Withdrawl Deposit Transfer Enquiry

Kakatiya Institute of Technology and Science Page 68


Roll No:_____________________ OOAD LAB

Class Diagram For Bank ATM System

Kakatiya Institute of Technology and Science Page 69


Roll No:_____________________ OOAD LAB

Bank
ATM customers
ACustomers
State
CustomerNumber Bank()
Current Customer readCustomers()
AccountBank addCustomers()
Start State findCustomer()
Pin State
Account State
Transact State Customer
ATM() CheckingAccount
setCustomerNumber() SavingsAccount
selectCustomer() customerNumber
selectAccount() pin
Withdraw() accounts
Deposit()
setState() Coustomer()
match()
getAccount()

0..*

BankAccount
Balance
ATM Simulation
BankAccount()
deposit()
withdraw()
getAccount()

Sequence Diagram For Bank ATM System

Kakatiya Institute of Technology and Science Page 70


Roll No:_____________________ OOAD LAB

Atm Database
Interface
:
User Insert Card

Enter Pin

Validate Pin

Validate Ok

Show Options

Choose Option

Select Withdrawl

Enter Amount
Check Balance

Validate Ok
Receive Cash

Remaining balance

Balance Slip

Collaboration Diagram For Bank ATM System

Kakatiya Institute of Technology and Science Page 71


Roll No:_____________________ OOAD LAB

5 : S h o w O p tio n s

A tm
In te rfa c e

1 : In se rt C a rd
2 : E n te r P in 3 : V a lid a te P in
6 : C h o o se O p tio n
8 : E n te r A m o u n t
7 : S e le c t W ith d ra w l 9 : C h e c k B a la n c e
1 1 : R e c e iv e C a sh 4 : V a lid a te O k
1 3 : B a la n c e S lip 1 0 : V a lid a te O k
1 2 : R e m a in in g b a la n c e

D a ta b a s e

: U ser

Activity Diagram For Bank ATM System

Kakatiya Institute of Technology and Science Page 72


Roll No:_____________________ OOAD LAB

insert card

enter pin

invalid

valid
select
transaction

perform
more trasactions transaction

no more transactions

collect card

Kakatiya Institute of Technology and Science Page 73


Roll No:_____________________ OOAD LAB

Component Diagram For Bank ATM System

h e a d e r file s
a tm _ m a in

A tm e x e c u ta b le
f ile s

a tm _ file s

A tm d a ta b a s e

w ith d r a w a l b a la n c e c h a n g e p in
m in i s t a te m e n t

Deployment Diagram For Bank ATM System

Kakatiya Institute of Technology and Science Page 74


Roll No:_____________________ OOAD LAB

Customer may be AT M
card holder,credit,debit AT M M achine
card holder or oline AT M providing services
user of bank M achine of ATM transaction

Bank Database keeping


the details of each and
Customer
every account
Console

Bank Client
Database Desktop

Client Desktop
providing services
at desks
Card
Reader

Employee
Console

WebPage Each bank employee


given a desktop and
provided with id,pwd
to login into database

Card Reader providing


services of credit,debit
transaction

Webpage providing
services of online
transaction

CASE STUDY:CELLULAR PHONE NETWORK

Kakatiya Institute of Technology and Science Page 75


Roll No:_____________________ OOAD LAB

Problem Statement:

In cellular communications networks, cells use beacon frequencies to ensure the


smooth operation of the network, for example in handling call handovers from one cell to
another. These frequencies are assigned according to a frequency plan, which is updated
from time to time, in response to evolving network requirements. The migration from one
frequency plan to a new one proceeds in stages, governed by the network’s base station
controllers. Existing methods result in periods of reduced network availability or performance
during the reassignment process. The Study Group was asked to develop an algorithm for
implementing a new frequency plan that maintains service quality during the transition.

A cellular network usage application is to be developed to assist cellular companies in


capacity planning. This application will report on cell tower site usage in two ways: 1)
immediate notification if a cell tower site's call capacity is being exceeded, and 2) a formatted
report on demand, showing calls in progress for a given cell tower site, or for all cell tower
sites. This application is not meant to be a simulation or real-time monitoring system of a
cellular network, but more of a simple "play back" application, for usage projections.

The application monitors cell tower site usage by tracking cell phones as they move
around, are turned on and off, originate or receive calls and run out of battery power. Note
that calls are tracked in two directions - both originating from the cell phone and received by
the cell phone. Calls may be made to or received from a cell phone being tracked in the
application, or from an outside number. Assume that the cell phone data comes from previous
field monitoring and testing procedures (although randomly generated data or keyed input are
other possible data capture sources).

Functional Requirements:

Cellular Network: A cellular network is a network distributed over land areas called cells,
each served by at least one fixed-location known as a or . When joined together these cells
provide radio coverage over a wide geographic area.

Place Phone call:User places a phone call to the receiver and the cellular network identifies
this phone call.

Receive phone call: User recieves a phone call from the sender and the cellular network
identifies this phone call.

Place Conference Call: User places a Conference call if he need and the cellular network
identifies it.

Kakatiya Institute of Technology and Science Page 76


Roll No:_____________________ OOAD LAB

Receive additional Call: when reciever is on call and gets an additional call then he holds
the present call and receive the additional call.

Non Functional Requirements:

a) System should be designed simple enough to enable User to operate the phone without any
formal training or delay.

b)System must handle Network and power failure.

c)System must be efficient to use and provide quick recover from the fault.

d) Software must validate and cancel operation in case of incorrect member


details,incomplete transaction, and time delay and return failure.

e)User interface screen must be designed to operate easily. It should have visual appealing.

Use Case Diagram For Cellular Phone Network

Kakatiya Institute of Technology and Science Page 77


Roll No:_____________________ OOAD LAB

< < e xte n d > >

P la c e P h o n e c a ll P la c e c o n fe r e n c e c a ll

C e llu la r
n e tw o r k

< < e xte n d > >

R e c e iv e p h o n e c a ll R e c e iv e a d d itio n a l c a ll

U ser

U s e s c h e d u le r

Class Diagram For Cellular Phone Network

Kakatiya Institute of Technology and Science Page 78


Roll No:_____________________ OOAD LAB

Speaker

Emit tone()

Dialler
Cellular Radio
Button
Digit()
Connect()
Send()

Dialler Display
Display CRDisplay
DisplayDigit()

Sequence Diagram For Cellular Phone Network

Kakatiya Institute of Technology and Science Page 79


Roll No:_____________________ OOAD LAB

S e n d :B u tto n :S e n d B u t to n :D i a le r : C e llu la r D i s p a y C R D i
A a d a p te r R a d io s p la y

1 : B u tt o n p r e s s e d ( )

2 : S e n d ()

3 : C o n n e c ti o n ( p n o )

4 : In u s e ( )

Collaboration Diagram For Cellular Phone Network

Kakatiya Institute of Technology and Science Page 80


Roll No:_____________________ OOAD LAB

1 : B u tt o n p re s s e d ()
2 : S e n d ()
S e n d : B u t to n : S e n d B u tt o n : D ia le r
A a d a p te r

3 : C o n n e c t io n (p n o )

4 : In u s e ()
: C e llu la r D is p a y C R
R a d io D is p la y

Kakatiya Institute of Technology and Science Page 81


Roll No:_____________________ OOAD LAB

Activity Diagram For Cellular Phone Network

Process the
dial

Busy Ringingtone

Give busy No response till t sec


indication

Response

Indicate no Balance Out Increment the usage time


balance Add Update the balance
Before 1 min

Have balance
Balance out

Cut the
service After Completion

Kakatiya Institute of Technology and Science Page 82


Roll No:_____________________ OOAD LAB

State Chart Diagram For Cellular Phone Network

idle

Off-hook

On-hook
On-hook
Dial
Ready to Talk
dial

B us y B usy Connecting Ringing Des tination


A lerted

Tim e-out

Kakatiya Institute of Technology and Science Page 83


Roll No:_____________________ OOAD LAB

Component Diagram For Cellular Phone Network

C e llu la r N e tw o rk M a i n

C e llu la r
E x e c u ta b le

N e tw o rk D a ta b a s e

N e tw o rk
User

M a k e C a ll R e c e iv e C a Ull s e S c h e d u leRr e c e iv e p h o n e C a ll
P la c e P h o n e C a ll

Kakatiya Institute of Technology and Science Page 84


Roll No:_____________________ OOAD LAB

Deployment Diagram For Cellular Phone Network

Cell GPS GPS Locator


Phone Controller {0...*}
W indow M obile
Phone

Control
console{0...*} Central
Server

Fixed
Installation

T ablet
PC{0...*}

CASE STUDY: STUDENT COURSE REGISTRATION SYSTEM

Kakatiya Institute of Technology and Science Page 85


Roll No:_____________________ OOAD LAB

Problem Statement:

At the beginning of each semester students may request a course catalogue containing a list
of course offerings for the semester. Information about each course, such as professor,
department, and prerequisites will be included to help students make informed decisions.

The new on-line registration system will allow students to select four course offerings for the
coming semester. In addition, each student will indicate two alternative choices in case a
course offering becomes filled or canceled. No course offering will have more than ten
students. No course offering will have fewer than three students. A course offering with
fewer than three students will be canceled. Once the registration process is completed for a
student, the registration system sends information to the billing system, so the student can be
billed for the semester.

Professors must be able to access the on-line system to indicate which courses they will be
teaching. They will also need to see which students signed up for their course offering.

For each semester, there is a period of time that students can change their schedules. Students
must be able to access the on-line system during this time to add or drop courses. The billing
system will credit all students for courses dropped during this period of time.

Functional Requirements:

Maintain curriculum: This use case is started by the registrar. It provides the capability to
create, review, modify, and delete a list of course offerings for a given semester.

Maintain Student Information: This use case is started by the registrar. It provides the
capability to create, review, modify, and delete student information.

Maintain Staff Information: This use case is started by the registrar. It provides the
capability to create, review, modify, and delete staff information.

Register for programmer: The use case is started by the student. It provides the capability
to create, review, modify, and delete a course schedule for a specified semester.

Write exam: This usecase is started by the student. It provides the capability to write exam.

Pay Fee: This usecase is started by the student. It provides the capability to pay fee.

NonFunctional Requirements:

Kakatiya Institute of Technology and Science Page 86


Roll No:_____________________ OOAD LAB

• System should be designed simple enough to enable staff to operate enqiry screen
without any formal training or delay.
• System must be secured and protected from the staff and other unauthorized users.A
student is allowed only to view and restricted to access/insert/update the other part of
the system.
• Student is not necessary to maintain the staff information,student information and
curriculum.
• Registrar is not necessary to pay fee and write exam.

UseCase Diagram for Student Course Registration System

Kakatiya Institute of Technology and Science Page 87


Roll No:_____________________ OOAD LAB

maintaincurrirculum

registrar
maintainstudent
information

maintainstaff
inforam ation

register for aprogrammer

student writeexamination

payfee

Kakatiya Institute of Technology and Science Page 88


Roll No:_____________________ OOAD LAB

Class diagram For Student Course Registration System

university department
has a
name : char[20] deptno : int 1..* head of
location : char[20] depname : char[20]

1
1..* 1

assigned to
member

1..* 1
1..*
student provide staff
sttudent name : char[20] staffname : char[20]
studentid : int staffid : int

1..* 1..*
attend teach

1..*
1..* 1..*
programme
progrmname : char[20]

Kakatiya Institute of Technology and Science Page 89


Roll No:_____________________ OOAD LAB

Sequence diagram For Student Course Registration System

student application inteview admission

1: send

2: attend

3: [pass]admit

Kakatiya Institute of Technology and Science Page 90


Roll No:_____________________ OOAD LAB

Collaboration diagram For Student Course Registration System

1: send
student application

3: [pass]admit

2: attend

inteview admission

Kakatiya Institute of Technology and Science Page 91


Roll No:_____________________ OOAD LAB

State chart diagram For Student Course Registration System

start
addstudent[c<n]

intialization open
add student/ set c=0
do/ intialize batch entry/ register student
exit/ increment student

cancel [c=n]
cancel

canceled close
do/ notify registerd students cancel do/ finalize batch

end

Kakatiya Institute of Technology and Science Page 92


Roll No:_____________________ OOAD LAB

Component diagram For Student Course Registration System

re g is tra tio n m a in c o urs e s

re g is tra tio n s tud e nt


e xe c uta b le

d a ta b a s e

a p p lic a tio n inte rvie w a d m is s io n

Kakatiya Institute of Technology and Science Page 93


Roll No:_____________________ OOAD LAB

Deployment Diagram for Student Course Registration System

Kakatiya Institute of Technology and Science Page 94


Roll No:_____________________ OOAD LAB

CASE STUDY : HOSPITAL MANAGEMENT SYSTEM

Problem Statement:

Due to budget cutbacks and general concern for providing the best service
possible to the public, we as a hospital would like to ensure that we are using our scarce
hospital resources in the most efficient manner possible. With this in mind we would like you
to design a system which will help us manage our hospital in an efficient, effective manner.
Specifically the system should help us schedule and monitor the various resources that we
have at the hospital. This includes keeping track of available beds, waiting lists for patients,
patients expected length of stay, scheduling of surgeries, patient notification and billing,
scheduling of nurses and doctors.

This function of the Hospital Management Information System deals with


registering new patients, for either OPD or IPD and issuing unique identification numbers to
the patients. These numbers are unique throughout the system.

A patient can be registered either at the IPD front office or at the OPD reception.
The OPD or IPD identification number is also created for each of the patient's separate visits.
This also serves as a part of patient registration. The IPD/OPD ID is used for tracking the
medical records of the patient for that particular OPD visit or IPD admission. All medical
records of the patient are identified by a combination of numbers, i.e. Patient ID and
OPD/IPD ID. The numbers allow for a flexible search in terms of finding the patient's history
record.

Functional requirements:

Prescription: This Module handles various activities such as Doctor Diagnoses the patient,
gives treatment & gives suggestions to the patients & prescribes laboratory tests& medicines.

Operation: This is initiated by the doctor and undergoes the various operations by
diagnosing the patients.

Checking: This is initiated by doctor who treats patients came for checking. Patients tells the
problem so that the doctor gives prescription according to his problem.

Receptionist: The person who gives the details of doctors, requirements available in the
hospital, gives the appointment to the patient and collects the fee from the patient.

Kakatiya Institute of Technology and Science Page 95


Roll No:_____________________ OOAD LAB

NonFunctional requirements:

a)System should be designed simple enough to enable receptionist to operate enqiry


screen without any formal training or delay.

b)System must be secured and protected from the staff and other unauthorized users.A
patient is allowed only to view and access the enquiry and restricted to access
/insert/update the other part of the system.

c)Staff members must know the correct functioning of the equipments in the hospitai.

d)Doctors must be available in any critical situation.

Use Case for Hospital Management System

Kakatiya Institute of Technology and Science Page 96


Roll No:_____________________ OOAD LAB

checking
patient

doctor operations

receptionist
prescription

Class Diagram For Hospital Management System

Kakatiya Institute of Technology and Science Page 97


Roll No:_____________________ OOAD LAB

hospital has a ambulance


name : char[20]

Goes to has a
has a has a
medical shop

patients wards staff


name : char[20] name : char[20] name : char[20]

is a is a is a

doctor nurses workers


Treatment
name : char[20] name : char[20] name : char[20]

Sequence Diagram For Hospital Management System

Kakatiya Institute of Technology and Science Page 98


Roll No:_____________________ OOAD LAB

D o c to r
Patient P a tieDoctor
nt in te rfa c e re c e p tio n is t
d ia gn o stic
1 : P a tie n ts n a m e , a ge

2 : C o lle c t fe e s
3 : C h e c k s p a tie n ts

4 : P e rfo rm so m e o p

5 : G e ts R e p o rt

6 : G iv e s p re s c rip tio n

Collaboration Diagram For Hospital Management System

Kakatiya Institute of Technology and Science Page 99


Roll No:_____________________ OOAD LAB

3: Checks patients
4: perform some op
6: Gives Prescript
Doctor Patient

2: Collect fees
5: Gets Report

1: Patients name,age

interface receptionist
diagnostic

Activity Diagram For Hospital Management System

Kakatiya Institute of Technology and Science Page 100


Roll No:_____________________ OOAD LAB

Doctor

check patient yes

NO
Prescription
perform
operation

Prescriptio
n

Component Diagram For Hospital Management System

Kakatiya Institute of Technology and Science Page 101


Roll No:_____________________ OOAD LAB

H o s p it a l H e a d e r f ile s
H o s p it a l M a in S p e c if ic a t io n

D o c to r

D ia g n o s is
H o s p ita l
E x e c u ta b le F ile R e c e p tio n is t
D e p a r tm e n t P a t ie n t T e s tin g

R e s u lt
d a ta b a s e
P a tie n t R e c o r d s

N am e Id C h ie f d o cNt oa rm e A ge A p p o in tm e n t

Deployment Diagram for Hospital Management System

Kakatiya Institute of Technology and Science Page 102


Roll No:_____________________ OOAD LAB

Disease UNT Server

artifact
Contains
Information about

Receptionist PC

articfact
User Friendly
Screens

CASE STUDY: LIBRARY INFORMATION SYSTEM

Kakatiya Institute of Technology and Science Page 103


Roll No:_____________________ OOAD LAB

Problem Statement:

Problems that are facing by the users while using the current Library system. The current
system of the university doesn’t allow users to login from different campuses.

1. As it is not available online every student calls up to find out if the book is available or not.
- Too many calls to answer

2. Every time a student calls for a book you have to check the racks for the availability of the
book. - Too much of physical work.

3. If some one reserves the book, he’s not sure if he definitely can get the book as the
previous student may not return in time.

4. Either the student has to call or come to the library to reserve the book, but cannot reserve
online over the internet.

5. Fines have to be calculated manually.

6. Students have no idea to check their account.

Functional Requirements:

a)Member of library:All the staff and student members of the college can become a member
and obtain the library card of library by showing id card issued by the college.

b)Article: A college library has books,journals audio and vedio and cassettes and
CDROMS.They are collectively called as articles in the library.

c)Lend Article:A library member can borrow maximum of 4 books for the period of 15 days.

d)Return of the Article:A library member can return an article. In case of default over due
charges will be levied.

e)Renewal of Article:A library member can renew the article borrowed,when other library
members donot reserve it.

f)Loss of Article: Loss of Issued Articles should be reported immediately to the librarian.

g)Loss of Member card: Loss of Member card should be reported immediately to the
librarian.

h)Enquiry:Library member can enquire about the articles details availability and their
possible return dates in case of issued.

i)Reservation: A Library member can reserve an article that is not currently available in the
library.

Non-Functional Requirements

Kakatiya Institute of Technology and Science Page 104


Roll No:_____________________ OOAD LAB

a) System should be designed simple enough to enable library member to operate enquiry
screen without any formal training or delay.

b)System must be secured and protected from library members and other unauthorized users.
A member is allowed only to view and access the enquiry and restricted to
access/insert/update the other part of system.A member can borrow, reserve or return book
only through a librarian.

c)System must handle Network and power failure.

d)System must be efficient to use and provide quick recover from the fault.

e) Software must validate and cancel operation in case of incorrect member


details,incomplete transaction, and time delay and return failure.

f)User interface screen must be designed to operate easily. It should have visual appealing.

Usecase Diagram For Library Information System

Kakatiya Institute of Technology and Science Page 105


Roll No:_____________________ OOAD LAB

Enquiry

MakeReservation

Member

Article Renewal

Remove reservation
Librarian

Lend article

Return of article

Class diagram For Library Information System


Kakatiya Institute of Technology and Science Page 106
Roll No:_____________________ OOAD LAB

lA
fF
tT
p
cie
M
m
a
b
rn
U
P
0
v
ryip
su
d
to
.a
e
a
tlcn
b
p
rd
w
s.yim
fd
cia
h
tu
yn
rb
m
*lo
e
lc
w
td
a
o
rive
a
n
cip
ltd
sro
w
m
vze
o
d
a
tlcn
isfp
b
m
e
t(rca
io
u
d
n
se
d
le
)n
cio
t(p
rg
m
te
n
(lc)io
b
(ct
n
p
)ih
e
(si)ly
a
rm
(is)e
s(
)te
()
)

Kakatiya Institute of Technology and Science Page 107


Roll No:_____________________ OOAD LAB

Sequence Diagram For Library Information System

F ro n t :T itle :A r tic le :M e m b e r
P a n e l:L e n d ...
: L ib r a r ia n

1 : L e n d in g d e ta ils ( T itle ,M e m b e r )
2 : V a lid a te :F in d B o r ro w in g L im it

3 : B o rr o w lim it o k

4 : F in d a v a ila b ility

5 : A v a ila b le O K

6 : U p d a te is s u e d e ta ils

7 : U p d a te a v a ila b le c o p y

8 : U p d a te b o o k b o rr o w e d

9 : C lo s e

Kakatiya Institute of Technology and Science Page 108


Roll No:_____________________ OOAD LAB

Collaboration Diagram For Library Information System

1 : L e n d in g d e ta ils ( T itle , M e m b e r ) 4 : F in d a v a ila b ilit y


7 : U p d a t e a v a ila b le c o p y
9 : C lo s e
F r o n t P a n e l:L e n d in g : T itle
W in d o w
: L ib r a r ia n 5 : A v a ila b le O K

6 : U p d a t e is s u e d e t a ils 2 : V a lid a te :F in d B o r r o w in g L im it
8 : U p d a te b o o k b o rro w e d
3 : B o r r o w lim it o k

: A r tic le :M e m b e r

Kakatiya Institute of Technology and Science Page 109


Roll No:_____________________ OOAD LAB

State Chart Diagram For Library Information System

T it le r e s e rv a tio n /r e s e rv e d c o p ie s + +
N o t r e s e rv e d
R e s e rv e d
e n try / re s e rva t io n := 0

R e s e r v a tio n r e m o v e d / r e s e r v e d c o p ie s --

Kakatiya Institute of Technology and Science Page 110


Roll No:_____________________ OOAD LAB

Activity Diagram For Library Information System

e
iA
a
R
sIw
vrsc
ie
tF
n
tsfq
a
d
o
iu
e
h
rn
i
rlce
to
r
lm
tva
a
b
ie
tl
a
it
e
vla
i
ro
e
a
istn
li
rce
a
l,
e
b
m
lse
e
rm
b
va
d
e
r
d

o
n
e

Kakatiya Institute of Technology and Science Page 111


Roll No:_____________________ OOAD LAB

Component Diagram For Library Information System

L i b ra ry m a in

L ib ra ry
e xe c uta b le

L i b ra ria n M ember

L i b ra ry d a ta b a s e

A rtic le re ne w a l R e m o ve R e s e rva tioR ne turn A rtic le M a k e re s e rva tio nE nq uiry

Kakatiya Institute of Technology and Science Page 112


Roll No:_____________________ OOAD LAB

Deployment Diagram For Library Information System

Node1: Library
Information Server

Node 2: Counter PC

Kakatiya Institute of Technology and Science Page 113


Roll No:_____________________ OOAD LAB

CASE STUDY:TICKET VENDING SYSTEM

Problem Statement:

A Ticket Vending System(TVM) dispenses tickets to passengers at a railway


station.Passengers use the front panel to specify their Boarding and destination place,details
of passengers(number of adults and children) and date of travel.The machine displays the fare
for the requested ticket.The passengers then deposits cash in the bin provided and presses
‘accept cash’.The machine checks the cash,if it is more,the balance cash is paid out.And the
ticket requested is printed.The system is also used by the operator who might want to
knowthe cash held in the machine,the break-up of small change available in the
machine,withdraw or deposit cash when need.And the report options also include the detailed
report of trasactions,summary report of the number of tickets sold for each
destication,opening balance,each collected,cash dispensed and current balance in the
machine.

Functional Requirements:

Specify Ticket details:Initiated by the passengers and gives the following


details:Destination place,date of journey,passengers details(adults,child) and coach details.

Buy ticket:Initiated by the passenger to buy ticket,the passenger pays cash and presses
‘accept cash’ button.the system checks out the cash and print out the ticket and dispense the
balance if any.The system also updates the records to reflect the number of tickets to each
designation,the total cash collected,total cash dispensed,current balance etc.,

Kakatiya Institute of Technology and Science Page 114


Roll No:_____________________ OOAD LAB

Summary report:Initiated by the operator to know the summary of the total business
transacted for the day,the cash collected and balance cash available in the system.

Get cash details: Initiated by the operator to get a denomination wise


number of notes and coins available with the machine at that time. The
operator connects from a remote place to vending machine to get cash
details.

Withdraw cash: Initiated by the operator to withdraw cash from the machine. The operator
connects to the machine locally and the machine dispenses cash.

Deposit cash :Initiated by the operator to deposit cash in the machine. The operator connects
to the machine locally and specifies the amount to be deposited with the denomination
details.

Check Master files: Initiated by the system administrator. System administrator can log in
from a remote place and check the details of machine-id, user-id, password and ticket,
balance details.

Update Master: Initiated by the system administrator to update system details.

Non Functional Requirements:

a) System should be designed simple enough to enable operators to get summary reports,get
chas details, withdraw cash and deposit cash without any delay.

b)System must be secured and protected from passengers and other unauthorized users. A
passenger is allowed only to enquire ticket details and buy ticket.

c)System Administrator must only check and update master files.

d)System must handle Network and power failure.

e)System must be efficient to use and provide quick recover from the fault.

f) Software must validate and cancel operation in case of incorrect passenger


details,incomplete transaction, and time delay and return failure.

g)User interface screen must be designed to operate easily. It should have visual appealing.

Kakatiya Institute of Technology and Science Page 115


Roll No:_____________________ OOAD LAB

Usecase Diagram For Ticket Vending System

specific ticket details

Passenger

Buy ticket
check master files

Summary report System


Administrators

Get cash Details Update master files


Operator

Withdraw cash

Deposit Cash

Kakatiya Institute of Technology and Science Page 116


Roll No:_____________________ OOAD LAB

Class Diagram For Ticket Vending System

Requistionslip
startingplace
FrontPanel destinationplace
traveldate
passenger[5]
age[5]
remark[5]
Cash
fare
Denomination
Printer

Ticket Report
Note
Denomination Denomination

Summary Receipt DebitNote

Kakatiya Institute of Technology and Science Page 117


Roll No:_____________________ OOAD LAB

Sequence Diagram For Ticket Vending System

P assenger : P F ro n t T ic k e t R e q u is itio F a re c a l c u l
P anel t ra n s a c te r n s l ip a to r
1 : T ic k e t R e q u e s t
2 : G e n e ra te R e q u e s t
3 : P re p a re S lip
4 : G e t F a re
5 : F a re

7 : F a re 6 : F a re
8 : In d ic a te F a re

Kakatiya Institute of Technology and Science Page 118


Roll No:_____________________ OOAD LAB

Collaboration Diagram For Ticket Vending System

1 : T ic k e t R e q ue s t 2 : G e ne ra te R e q ue st
F ro nt T ic k e t
P a ne l tra ns a c te r
8 : Ind ic a te F a re 7 : F a re
P a ss enge r : P

6 : F a re

3 : P re p a re S lip

4 : G e t F a re
R e q uisiti F a re c a lc
o ns lip ula to r
5 : F a re

Kakatiya Institute of Technology and Science Page 119


Roll No:_____________________ OOAD LAB

Activity Diagram For Ticket Vending System

Kakatiya Institute of Technology and Science Page 120


Roll No:_____________________ OOAD LAB

Start

specify ticket
details

Check master
files

Ticket Available Tickets not available

Buy Ticket

Get cash
details

Pay cash

Update master
Files

Component Diagram For Ticket Vending System

Kakatiya Institute of Technology and Science Page 121


Roll No:_____________________ OOAD LAB

T ic k e t V e nd ing M a in

T ick e t V e nd ing
E xe c uta b le F ile

O p era to r P a sse nge r

T ick e tV e nd ingD a ta b a s
e

D e p o s it C a sh W ithd ra w c a sh
S um m a ry R e p o rtB uy T ic k e t T ic k e t D e ta ils

Deployment Diagram For Ticket Vending System

Kakatiya Institute of Technology and Science Page 122


Roll No:_____________________ OOAD LAB

Ticket Vending Main


Server

server1 server2
server3

CASE STUDY: TRADING SYSTEM

Kakatiya Institute of Technology and Science Page 123


Roll No:_____________________ OOAD LAB

Problem Statement

The Trading System must take care of sales information of the company and must
analyze the potential of the trade.
A Trading System processes live market data from the Data Provider using compute
resources hosted by the Compute Provider, running software from the Software Provider to
supply processed data to the customer.
A Trading System demands a high availability of resources. Non-availability of
resources means an absence in market trading which, in turn, can lead to missed
opportunities. Security is of paramount importance. In addition, regulatory issues exist within
institutions that place restrictions on the accessibility of spatial information across their
distributed enterprises.

Functional Requrements:

Place order: This module is initiated by the customer to place a order.

Track order: This module is initiated by the customer to track order.

Ship order: This module is initiated by the customer in which all orders will be shipped
without delay.
Ship Partial order:This module is initiated by customer in which all orders will be
shipped partially.
Bill customer: This module is initiated by customer to bill the consumer (for credit card use
only).

Validate customer: This module is initiated to check for the validation of the customer

Non Functional Requrements:

a)System should be designed simple enough to enable customer to operate enqiry place,
track, ship, partial ship order without any delay.

b)System must be secured and protected from the customer and other unauthorized users.A
student is allowed only to view and restricted to access/insert/update the other part of the
system.

c)System should handle Network and power failure.

d)Software must be efficient to use and provide quick recover from the fault.

Kakatiya Institute of Technology and Science Page 124


Roll No:_____________________ OOAD LAB

Usecase Diagram For Trading System

Kakatiya Institute of Technology and Science Page 125


Roll No:_____________________ OOAD LAB

P lace o rder << inclu de>>

<< in clud e>>


T rack order
< < include> >
V alidate C ustom er
S hip o rder

C u stom er
S hip partial ord er

B ill cu sto m er

Class Diagram For Trading System

Kakatiya Institute of Technology and Science Page 126


Roll No:_____________________ OOAD LAB

Product
Customer
Order Id
name Places Item Name
address
quantity 1 1..* Price
phone
Location

Prepare

Process

Invoice Transaction Shipment Stock

Sequence Diagram For Trading System

Kakatiya Institute of Technology and Science Page 127


Roll No:_____________________ OOAD LAB

O rd er taken O rd er B illing age n t


C usto m er fu lfillm ent

1 : S ub m it O rd er
2: P lace order
3: T rigger bill

4: Ackn ow ledge o rd er

Collaboration Diagram For Trading System

Kakatiya Institute of Technology and Science Page 128


Roll No:_____________________ OOAD LAB

1: Submit Order
Order
taken
Customer :
Customer

4: Acknowledge order 2: Place order

3: Trigger bill
Order Billing
fulfillment agent

Activity Diagram With SwimLanes options For Trading System

Kakatiya Institute of Technology and Science Page 129


Roll No:_____________________ OOAD LAB

C u s to m e r S a le s

Reques t
S ervice
Tak e order

F ill order

P ay

Deliver
O rder

Collec t
order

Component Diagram For Trading System

Kakatiya Institute of Technology and Science Page 130


Roll No:_____________________ OOAD LAB

T rading M ain

T rading System
Executable File

C ustom er Sales P erson

T rading Database

G ive O rder P lace O rder T rack O rder B ill custom er

Deployment Diagram For Trading System

Kakatiya Institute of Technology and Science Page 131


Roll No:_____________________ OOAD LAB

Purchase
Stock Balance

Reorder
Check

Place order
Receiver
Order

Kakatiya Institute of Technology and Science Page 132

Você também pode gostar