Class diagram, use case and sequence diagram
-
Upload
baabtracom-mentoring-partner-first-programming-school-in-india -
Category
Education
-
view
5.779 -
download
4
description
Transcript of Class diagram, use case and sequence diagram
Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
Class diagram, Use case and Sequence diagram
Subhin [email protected]/
subhinvelayudhantwitter.com/111subruin.linkedin.com/in/Subhin P V8129076036
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
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
• 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(){}
}
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
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.
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
MessagesActive objects
Activation Box LifelineControl Information
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/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us