Click Here to Install Silverlight*
IndiaChange|All Microsoft Sites
MSDN
|Developer Centers|Library|Downloads|How To Buy|Subscribers|My MSDN
 
UML Fundamentals –II
By : Ashutosh Goyal
 
Article Posted: November 26, 2004
 
Continuing with my previous article of “UML Fundamentals –I” at http://www.microsoft.com/india/msdn/articles/274.aspx , i am discussing remaining components here.
 
3. Collabration Diagram:
  Collabration Diagram is just equivalent to sequence diagram. The only difference between sequence Diagram and Collabration diagram is that it shows interaction between objects more clearly. These objects are same which we defined in our sequence Diagram i.e. Shopping Cart, Cart Item as in our earlier sequence Diagram. These objects can be Instances of classes, any third party component or hardware components/interface used in application.
4. Class Diagram:
  Class diagram shows different classes and relationships between them. There are three types of classes as: Boundary Class, Entity Class and Control Class.
  Boundary Class is classes which exist on boundary between the application and external world as Forms, reports etc.
  Entity Class holds information that has persistent storage. Persistent storage means storage on some permanent Space on disk, File etc. This category of class includes classes representing structure of the database.
  Control Class are not executable ones, these are only responsible for coordinating another classes. Control class is generally one class per use case / module e.g. for implementing security in module, different classes exists. Now these classes will be handled in application using Security Control Class.
  The access scope of class are Public, Private, Protected and Package.
  Public means classes can be accessed by any other class in project.
  Private means Classes can not be accessed by any other class in project.
  Protected means classes can be accessible to child classes, but not to any other one.
  Package means class will be accessible to all classes in same package.
  Cardinality means how many instances of a class will be handled by other classes. It can be 0..0, 0..1, 0..n, 1..1 and 1..n
  The different relationships which UML supports between different classes are: Association, Dependency, Aggregation and Generalization.
  Association: Association between two classes means two classes are simply associated with each other. Association is also called as “IS A” Relation. Association is of two types: Unidirectional and Bidirectional. Unidirectional means only one class is associated with another one and bidirectional means both the classes are associated with each other.
 
 
  Dependency: Dependency between two classes mean one class is dependent on another class. If Class A is having Dependency relationship with Class B then it means Class A can’t execute alone as it is dependent on class B.
 
  Aggregation: This relationship is also named as “HAS A” relation. This relation ship occurs between two classes as Whole Part relation. This is stronger form of Association.
 
  Generalization: Generalization is inheritance relationship between two classes. This relationship allows to inherit public and protected attributes and methods from child class.
 
5. State Transition Diagram:
  State Transition Diagram represents different state which an object can hold and how an object moves from one state to another state. This diagram also shows life cycle of object starting from Start to End i.e. until it is destroyed.
 
  As you see from the diagram the Account object can have multiple states and how they move from one state to another state. This movement of object from one state to another state is called Transition.
  Rest of the components i.e. Activity Diagram, Component Diagram, deployment will be discussed in next article along with advantages of UML and which component will be used in which stage of SDLC.
 
 

©2009 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement
Microsoft