Thursday, February 16, 2012

Part 2: 

Class Diagram : Logical view
    - 4 different ways of representing class in UML notation



 - Visibility :
-  State and attribute : 
- Relationship :


Multiplicity indicator



 - Dependencies :  A dependency between two classes declares that a class needs to know about another class to use objects of that class.


- Association  An association describes discrete connections among objects or other instance in a system ( it  means that a class will actually contain the reference to an object or objects , of the other class in form of attribute. )


The Account class is optionally associated with zero or more objects of the AddressBook class; the AddressBook is also associated with one and only one Account


a) Navigatability :   


b) Association classes :
 
        AddressBook associated with an Account by virtue of the fact that it is associated with a  particular AddressBook





- Aggregation :  
                           It is kind of association that specifies a whole/part relationship between the aggregate (whole) and a component part. It is really just a stronger version of association and is used to indicate that a class actually owns but may share objects of another class. It is also called a “has a” relationship. 


- Composition : composition is an even stronger relationship than aggregation, although they work in very similar ways.



If the Blog is deleted, then its corresponding parts (BlogEntries) are also deleted. This is exactly what composition is all about modeling the internal parts that make up a class.


- Generalization / Inheritance :   
           Generalization relationship is a relationship in which one model element (the child) is based on another model element (the parent). Generalization relationships are used in class, component, deployment, and use case diagrams.








- Realization :  The realization relationship connects a model element, such as a class, to another model element, such as an interface, that supplies its behavioral specification but not its structure or implementation.
 realization relates two elements at different semantic level for ex:  an interface and class


- Constraint
  http://www.is.informatik.uni-duisburg.de/courses/mod_ws06/skript/uml-ocl.pdf


There are three types of constraint can be applied to class member using 
OCL (Object constain language).
a) Invariants : - 
b) Pre-conditons :-
c) Post-condition :-




-Reference Material :


a) Video for Class UML
b) http://www.holub.com/goodies/uml/






No comments:

Post a Comment