UML Class Diagram

Views:
 
Category: Education
     
 

Presentation Description

No description available.

Comments

By: tsrip (8 month(s) ago)

i want dis doc .how to download it?

By: nishujain1188 (15 month(s) ago)

a good presentation of uml diagrams

By: hitu.cool29 (15 month(s) ago)

hi

Presentation Transcript

UML Class Diagram:

Object oriented system analysis & design Ms.fernando UML Class Diagram

Agenda:

Agenda UML Class Diagrams 2 What is a Class Diagram? Essential Elements of a UML Class Diagram

What is a Class Diagram?:

What is a Class Diagram? UML Class Diagrams 3 A class diagram describes the types of objects in the system and the various kinds of static relationships that exist among them. A graphical representation of a static view on declarative static elements. A central modeling technique that runs through nearly all object-oriented methods. The richest notation in UML.

Essential Elements of a UML Class Diagram:

Essential Elements of a UML Class Diagram UML Class Diagrams 4 Class Attributes Operations Relationships Associations Generalization Dependency Multiplicity Aggregation & Composition

Classes:

Classes UML Class Diagrams 5 A class is the description of a set of objects having similar attributes, operations, relationships and behavior. Window size: Size visibility: boolean display() hide() Class Name Attributes Operations

Associations:

Associations UML Class Diagrams 6 A structural link between two peer classes. An association between two classes indicates that objects at one end of an association “recognize” objects at the other end and may send messages to them. Example : “An Employee works for a Company” Employee Company

Associations (cont.):

Associations (cont.) UML Class Diagrams 7 StaffMember Student 1..* * instructs instructor Association name Role name Multiplicity Navigable (uni-directional) association Courses pre - requisites 0..3 Reflexive association Role *

Associations (cont.):

Associations (cont.) UML Class Diagrams 8 To clarify its meaning, an association may be named. The name is represented as a label placed midway along the association line. Usually a verb or a verb phrase. A role is an end of an association where it connects to a class. May be named to indicate the role played by the class attached to the end of the association path. Usually a noun or noun phrase Mandatory for reflexive associations

Associations (cont.):

Associations (cont.) UML Class Diagrams 9 Multiplicity The number of instances of the class, next to which the multiplicity expression appears, that are referenced by a single instance of the class that is at the other end of the association path. Indicates whether or not an association is mandatory .

Associations (cont.):

Associations (cont.) UML Class Diagrams 10 Multiplicity Indicators Exactly one 1 Zero or more (unlimited) * (0..*) One or more 1..* Zero or one (optional association) 0..1 Specified range 2..4 Multiple, disjoint ranges 2, 4..6, 8

Aggregation:

Aggregation UML Class Diagrams 11 A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts. Models a “is a part-part of” relationship. Whole Part Car Door House 1.* 1..*

Composition:

Composition UML Class Diagrams 12 A strong form of aggregation The whole is the sole owner of its part. The part object may belong to only one whole The life time of the part is dependent upon the whole. The composite must manage the creation and destruction of its parts. Circle Point 3..* 1 Polygon Point Circle

Generalization:

Generalization UML Class Diagrams 13 Indicates that objects of the specialized class (subclass) are substitutable for objects of the generalized class (super-class). “is kind of” relationship. Shape {abstract} Circle Super Class Sub Class An abstract class Generalization relationship {abstract} is a tagged value that indicates that the class is abstract. The name of an abstract class should be italicized

Generalization:

Generalization UML Class Diagrams 14 A sub-class inherits from its super-class Attributes Operations Relationships A sub-class may Add attributes and operations Add relationships Refine (override) inherited operations A generalization relationship may not be used to model interface implementation.

Dependency:

Dependency UML Class Diagrams 15 A dependency indicates a semantic relation between two or more classes in which a change in one may force changes in the other although there is no explicit association between them. A stereotype may be used to denote the type of the dependency.

Assignment #1:

Assignment #1 UML Class Diagrams 16 Collaborative work (group with 5 members) Create a simple Class diagram of your existing IT Research Project Indicate the explanation of the diagram Minimum of 5 classes Submission on Thursday (Jan 13).

Reminder:

Reminder UML Class Diagrams 17 Career Development Seminar (IT / IM graduating students) January 12 (Wednesday) 8:30 am – 12:00 nn Bring resume Business Attire