2. 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
3. Class diagram, Use case and
Sequence diagram
Subhin P.V
111subru@gmail.com
www.facebook.com/subhinv
elayudhan
twitter.com/111subru
in.linkedin.com/in/Subhin P V
8129076036
4. CLASSES
• A class is 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 in fields
– exposes its behavior through methods
5. 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.
7. An example of CLASS DIAGRAM
Person
- eat(): void
- sleep(): void
- work(): void
-play():String
+ name : String
# address : String
# birthDate : Date
/ age : Date
- ssn : int
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(){
}
}
8. USE CASE
• a use case is 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 a Use
Case Diagram
9. USE CASE DIAGRAM
• It is a UML diagram.
• A use case diagram at its simplest is a
representation of a user's interaction with the
system and depicting the specifications of
a use 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.
11. 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
15. 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
16. 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>>
17.
18. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com