Class diagram, use case and sequence diagram

13,141 views

Published on

Published in: Education, Technology
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
13,141
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
324
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

Class diagram, use case and sequence diagram

  1. 1. Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .Ltd
  2. 2. Class diagram, Use case andSequence diagramSubhin P.V111subru@gmail.comwww.facebook.com/subhinvelayudhantwitter.com/111subruin.linkedin.com/in/Subhin P V8129076036
  3. 3. CLASSES• A class is the blueprint from which individualobjects are created.• A class is a description of a set of objects thatshare the sameattributes, operations, relationships, andsemantics.• 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
  4. 4. CLASS DIAGRAM• Class Diagram is a pictorial representation of aClass for better understanding of a class• Graphically, a class is rendered as a rectangle,usually including its name, attributes, andoperations in separate, designatedcompartments.
  5. 5. CLASS DIAGRAMCLASS NAMEATTRIBUTESMETHODS
  6. 6. An example of CLASS DIAGRAMPerson- eat(): void- sleep(): void- work(): void-play():String+ name : String# address : String# birthDate : Date/ age : Date- ssn : intpublic 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(){}}
  7. 7. USE CASE• a use case is a list of steps, typically defininginteractions between a role (actor) and asystem, to achieve a goal.• The actor can be a human or an externalsystem.• the relationships between all (or a set of) theuse cases and actors are represented in a UseCase Diagram
  8. 8. USE CASE DIAGRAM• It is a UML diagram.• A use case diagram at its simplest is arepresentation of a users interaction with thesystem and depicting the specifications ofa use case.• A use case diagram can portray the differenttypes of users of a system and the variousways that they interact with the system.
  9. 9. USE CASE DIAGRAMUse case diagram of a restaurant
  10. 10. SEQUENCE DIAGRAM• Generally show the sequence of events thatoccur.• Illustrates the objects that participate in a usecase and the messages that pass betweenthem over time for one use case
  11. 11. SEQUENCE DIAGRAM(contd..)Diagram: A sequence diagram of request and response between apatient and a receptionist
  12. 12. SEQUENCE DIAGRAM SYNTAX
  13. 13. SEQUENCE DIAGRAM(contd..)• COMPONENTS OF A SEQUENCE DIAGRAMSequence DiagramMessagesActive objectsActivation Box LifelineControlInformation
  14. 14. 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 derivesbenefits from the system• Messages:– Used to illustrate communication between different activeobjects.– Used when an object needs• to activate a process of a different object• to give information to another object
  15. 15. SEQUENCE DIAGRAM(other components)• Lifeline– Denotes the life of actors/objects over time during asequence• Focus of control (activation box)– Means the object is active and using resources duringthat time period• Control information– Shows the control flow in the system– Creation and destruction of an object through<<create>> and <<destroy>>
  16. 16. If this presentation helped you, please visit ourpage facebook.com/baabtra and like it.Thanks in advance.www.baabtra.com | www.massbaab.com |www.baabte.com
  17. 17. Contact Us

×