Uml

April 28, 2017 | Author: Neo Nigra | Category: N/A
Share Embed Donate


Short Description

Download Uml...

Description

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 b. Use case of Library management c. Use case of Railway Reservation System 12 4. Class introduction 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 7. Interactive diagram a. Interactive diagram for ATM machine b. Interactive diagram for Library Management system 23 c. Interactive diagram for Railway Reservation system 8. Collaboration introduction 9. Collaboration diagram a. Collaboration diagram for ATM machine 26 b. Collaboration diagram for Library machine c. Collaboration diagram for Railway Reservation machine 28 10.State machine diagram 11.State chart diagram for CD player 12.Activity diagram introduction 13.Activity diagram a. Activity diagram of ATM without swinlanes b. Activity diagram of ATM with swinlanes 36 14.Component diagram introduction 15.Component diagrams a. Component diagram for ATM System b. Component diagram for Hospital Management System 42 16.Deployment diagram 17.Deployment diagram for ATM system 18.Forward engineering 19.Reverse engineering 20.Case study a. Bank ATM System b. Cellular phone Network c. Student course registration system d. Hospital Management System Kakatiya Institute of Technology and Science

10 11 13

19 22 24 25

27 30 32 33 35 37 41 43 44 45 54 61 69 79 88 Page 1

Roll No:_____________________

OOAD LAB

e. Library Information system f. Ticket vending system 107 g. Trading system 115

97

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:_____________________

1. 2. 3. 4. 5. 6. 7. 8. 9.

OOAD LAB

Enterprise Information Systems Banking and Financial Services Telecommunications Transportation Defense and Aerospace Retail Medical Electronics Scientific 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:_____________________

4.

a)

OOAD LAB

Actor: - The out side entity that communicates with a system. Typically a person playing a role on an external device.

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.

a)

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.

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:_____________________

b)

OOAD LAB

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) Aggregation: It is a ‘has_a’ relationship. It is of two types as -

1.

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 relationships1. 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 usecase 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:_____________________

2.

OOAD LAB

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

4.

Transfer funds

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

Client

Kakatiya Institute of Technology and Science

Suppler B

Page 16

Roll No:_____________________

OOAD LAB

5.1Class diagram for Collage Management System

Kakatiya Institute of Technology and Science

Page 17

Roll No:_____________________

C o lle g e n a m e : s t rin g lo c a t io n : s t rin1g

N o n t e a c hin g s ta ff n a m e : s t rin g Q u a lific a t io n : s t rin g * * 1

*

A d d s tu d e n t () 1 re m o ve s tu d e n t() a d d d e p () re m d e p t() 1 a d d s t a ff() re m s t a ff() 1

OOAD LAB

1

1

* T& P s e c t io n s tu d _ id : in t s tu d _ n a m e : s t rin g B ra n c h : s trin g c o m p a n y n a m e : s trin g

*

L ib ra ry B o o k id : in t

*

D e p a rt m e n t D e p t n u m : in t D e p t n a m e : s t rin g L o c a tio n : s trin g

1

A d d s u b je c t () R e m o ve s u b je c t () 1 .. *

1 Is s u e () re n e w a l() C o lle c t fin e () * 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 n a m e : s t rin g B ra n c h : s trin g * E n ro llm en t () A t te n d c la s s e s () A t te n d E x a m s ()

*

*

S u b je c t id : in t n a m e : s t rin g 1

*

L e c tu re r n a m e : s t rin g D e s ig n a tio n : s trin g D e p t id : in t T e a c hin g ()

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 () 1

H o s p it a l 1 N a m e : s t rin g L o c a t io n : s t r in g 1 m a in t a in d o c t o r re c o r d s ( ) 1 m a in t a in p a t ie n t r e c o r d s () m a i n t a i n s t a ff r e1 c o r d s ( )

*

1

D e p a rt m e n t D e p t n u m : in t D e p t n a m e : s t rin g L o c a t io n : s t r in g < < > 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 O t h e r s t a ff 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 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 ()

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

N u rs e s

L a b t e h n ic ia n s

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 B oo k s B o o k id : in t Title : s trin g A u tho r : s trin g

Is s u e c a rd s () m a in ta in b o ok d e ta1ils () 1

1

1

*

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 Id : in t N am e : s tring Is s u e b oo k s () 1 ren ew a l() c o llec t fin e () c o llec t b o ok s ()

O p eration B oo k id : in t *

is s u e () ren ew a l() * return() fin e()

U s er id : in t N am e : s trin g 1

s tu den t

Tak e b ook s () p ay fine () ret urn b oo k s ()

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) b) 1.

Sequence Diagrams. Collaboration diagrams. 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. 2. 3. 4. 5. 6. 7.

Simple Synchronous Balking Time out Asynchronous Procedure call 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 1: Enquiry about train

Reservation counter

database

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

User

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 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:_____________________

1.2.

OOAD LAB

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 8 : In va lid : D o e s n o t is s u e

6 : C h e c k s fo r va lida t io n 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 e

L ib raria n 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

1.

1.

There are two types of state-machine diagrams: 1. State chart diagram 2. Activity diagram 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. 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

1.

• On entry • On exit • Do • On event 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

Pause

Forward

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 number

Verify pin number

Check pin number

Invalid 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:_____________________

f)

OOAD LAB

EXE:- A component of the type EXE represents executable(.exe file).

1.

Interface:- An interface specifies the externallyvisible 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

. ex e file

da tab as e

A TM Tra ns ac tion

. h 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

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

D o c to r

D e p a r t m e n t P a t ie n t s

. h fi le 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 Machine

Modem

Server

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 Teaching()

Non Teaching Staff 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: Radius : int E R C B IN W 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 void set_the_Engine (Engine const Wheels get_the_Wheels void set_the_Wheels (Wheels

() const; value); () const; 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:_____________________ public:

OOAD LAB

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 compilation.

and

press

F3(Action->Analyse)

for

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 asOutput:-

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 brand_name : char [20] num_plate : char [10] ins_num : int 1 D : Door

Engine +E

br_type : char [10]

1 runs_car()

1 Wheel +W 1

Radius : int 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



Transaction

Withdrawl

Deposit

Kakatiya Institute of Technology and Science

Bank

Transfer

Enquiry

Page 68

Roll No:_____________________

OOAD LAB

Class Diagram For Bank ATM System

Kakatiya Institute of Technology and Science

Page 69

Roll No:_____________________

ATM State CustomerNumber Current Customer AccountBank Start State Pin State Account State Transact State ATM() setCustomerNumber() selectCustomer() selectAccount() Withdraw() Deposit() setState()

OOAD LAB

Bank customers ACustomers Bank() readCustomers() addCustomers() findCustomer() Customer CheckingAccount SavingsAccount customerNumber pin accounts Coustomer() match() getAccount() 0..*

ATM Simulation

BankAccount Balance BankAccount() deposit() withdraw() getAccount()

Sequence Diagram For Bank ATM System

Kakatiya Institute of Technology and Science

Page 70

Roll No:_____________________

OOAD LAB

Atm Interface : User

Database

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 6 : C h o o se O p tio n

2 : E n te r P in

3 : V a lid a te P in

8 : E n te r A m o u n t

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 0 : V a lid a te O k 1 3 : B a la n c e S lip

7 : S e le c t W ith d ra w l

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

more trasactions

perform 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

m in i s t a te m e n t

c h a n g e p in

Deployment Diagram For Bank ATM System Kakatiya Institute of Technology and Science

Page 74

Roll No:_____________________

Customer may be AT M card holder,credit,debit card holder or oline user of bank

OOAD LAB

AT M M achine

AT M M achine providing services of ATM transaction

Bank Database keeping the details of each and every account

Customer Console

Bank Database

Client 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() Send()

Dialler Display

Display

Connect()

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 A a d a p te r

:D i a le r

: C e llu la r D i s p a y C R D i 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 tt o n A a d a p te r

S e n d : B u t to n

: D ia le r

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

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

Kakatiya Institute of Technology and Science

D is p a y C R D is p la y

Page 81

Roll No:_____________________

OOAD LAB

Activity Diagram For Cellular Phone Network

Process the dial

Busy

Give busy indication

Ringingtone

No response till t sec

Response

Indicate no balance

Increment the usage time Add Update the balance

Balance Out Before 1 min

Have balance Balance out Cut the service

Kakatiya Institute of Technology and Science

After Completion

Page 82

Roll No:_____________________

OOAD LAB

State Chart Diagram For Cellular Phone Network

idle

Off-hook

On-hook

On-hook Dial Talk

Ready to 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 Phone

Control console{0...*}

W indow M obile Phone

GPS Controller

GPS Locator {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

m aintaincurrirculum

registrar m aintainstudent inform ation

m aintainstaff inforam ation

register for aprogram m er

student

writeexam ination

payfee

Kakatiya Institute of Technology and Science

Page 88

Roll No:_____________________

OOAD LAB

Class diagram For Student Course Registration System

university name : char[20] location : char[20]

department 1..* deptno : int depname : char[20]

has a

1

1..*

head of

1 assigned to

member

1..*

1..* student sttudent name : char[20] studentid : int

provide

1

staff staffname : char[20] staffid : int

1..*

1..* teach

attend

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

student

1: send application

3: [pass]admit 2: attend

inteview

Kakatiya Institute of Technology and Science

admission

Page 91

Roll No:_____________________

OOAD LAB

State chart diagram For Student Course Registration System start addstudent[c >

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:_____________________

Customer name address phone

OOAD LAB

Places

Order Item quantity 1

Product Id Name 1..* Price 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 C usto m er

O rd er fu lfillm ent

B illing age n t

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 fulfillment

Billing 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

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF