Sie sind auf Seite 1von 19

Disclaimer: This presentation is prepared

by trainees of baabtra as a part of


mentoring program. This is not official
document of baabtra Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System
Technologies Pvt . Ltd

Class diagram, Use case


and Sequence diagram
Subhin P.V
111subru@gmail.com
www.facebook.com/subhinvel
ayudhan
twitter.com/111subru
in.linkedin.com/in/Subhin P V
8129076036

CLASSES
Aclassis the blueprint from which
individual objects are created.
A class is a description of a set of objects
that share the same attributes,
operations, relationships, and semantics.
Class contains Attributes and Methods.
A class object can be created to access
class methods.
An object stores its state infields
exposes its behavior throughmethods

CLASS DIAGRAM
Class Diagram is a pictorial
representation of a Class for better
understanding of a class
Graphically, a class is rendered as a
rectangle, usually including its name,
attributes, and operations in
separate, designated compartments.

CLASS DIAGRAM
CLASS NAME

ATTRIBUTES

METHODS

An example of CLASS
DIAGRAM
public class Person{
public String name;
protected String
address;
protected Date
birthDate;
derived Date age;
private int ssn;
void eat(){
}
void sleep(){
}
void work(){
}
String play(){
}
}

Person

+ name
: String
# address : String
# birthDate : Date
/ age
: Date
- ssn
: int

- eat(): void
- sleep(): void
- work(): void
-play():String

USE CASE
ause caseis a list of steps, typically
defining interactions between a role
(actor) and a system, to achieve a
goal.
The actor can be a human or an
external system.
the relationships between all (or a
set of) the use cases and actors are
represented in aUse Case Diagram

USE CASE DIAGRAM


It is a UML diagram.
Ause case diagramat its simplest is
a representation of a user's interaction
with the system and depicting the
specifications of ause case.
A use case diagram can portray the
different types of users of a system
and the various ways that they
interact with the system.

USE CASE DIAGRAM

Use case diagram of a restaurant

SEQUENCE DIAGRAM
Generally show the sequence of
events that occur.
Illustrates the objects that participate
in a use case and the messages that
pass between them over time for one
use case

SEQUENCE
DIAGRAM(contd..)

Diagram: A sequence diagram of request and response


between a patient and a receptionist

SEQUENCE DIAGRAM
SYNTAX

SEQUENCE
DIAGRAM(contd..)

COMPONENTS OF A SEQUENCE
DIAGRAM
Sequence
Diagram

Active objects

Control
Information

Messages

Activation Box

Lifeline

SEQUENCE DIAGRAM
(important components)
Active Objects:
Any objects that play a role in the system
Can be any object or class that is valid within the
system
Can be an Actor that is external to the system
and derives benefits from the system

Messages:
Used to illustrate communication between
different active objects.
Used when an object needs
to activate a process of a different object
to give information to another object

SEQUENCE DIAGRAM
(other components)
Lifeline
Denotes the life of actors/objects over time
during a sequence

Focus of control (activation box)


Means the object is active and using
resources during that time period

Control information
Shows the control flow in the system
Creation and destruction of an object through
<<create>> and <<destroy>>

THANK
YOU

If this presentation helped you, please visit our page


facebook.com/baabtraand like it.

Thanks in advance.

www.baabtra.com|www.massbaab.com|www.baabte.com

Contact Us

Das könnte Ihnen auch gefallen