Wednesday, August 26, 2015

How to read ArcObjects - Object Model Diagrams - 2


Reading Object Model Diagrams


In last post we learned about UML - Relationship symobls like Association, Multiplicity, Is Composed of, Creates a and Is a type of. If anyone missed please refer below link :

In this post we will continue (UML Classes, properties and methods).

Class Types :

Abstract Class - 
The Bird class is called an abstract class. Abstract class means that we cannot make any of these objects. In reality, they are no birds. They are type of birds. The abstract call is really just there for generalization and inheritance purposes. Common characteristics that are inherited by any subclass. 

CoClass -
The Chicken is a CoClass. A Coclass means you can create objects from these classes. Anytime we see a CoClass means we can write two lines of code to make one of these objects. 

These are ours starting point. If you are not sure where to start writing code, you can locate a CoClass on any diagram and, in two lines of code, you can make an object out of it.

Class - 
Classes cannot directly create objects, but objects of a class can be created as a property of another class or instantiated by objects from another class.

we cannot make Egg or Wings. Other objects have to do the creation for us.We can see it on the diagram here with the "creates" relationship symbol.Chicken creates eggs. If we want Egg object, we have to go to the chicken and have it make the Egg for us. If we don't have a Chicken, its a CoClass, we can make one with two lines of code and get it to make the Egg.

That's the end of classes. We will continue UML properties and methods in the next post.


No comments:

Post a Comment