Before knowing the the role of class-oriented metrics in
assessing the quality of an OO system, lets first see what is the
meaning of an OO system :
- OO system : OO system or we can say Object Oriented
system, are those in which everything was design as class and
objects. where objects are real world entity like human, bird,
table, etc. And Class is defined as the blueprint of the object.
Also there are four features or we can say four fundamentals of
object oriented system are abstraction, polymorphism, encapsulation
and inheritance.
Now moving on Class oriented matices , see what they
have and how they assess the quality of OO system:
Class oriented matrices : First of all it was propoesed
by Chidamber and kemerer. It was degined in such a way that take
cares of few things as :
- Weighted methods per class : As in every class there
are some vaiables and methods(functions) are present. Some methodes
are having much more importance and some having less importance
than others, so all the methods which are more important are
weighted methods. Class oriented matrices are having the weighted
methods per class. So it helps in identifying the more valueable
methodes in entire class. Methodes in object oriented system are
treated as the behaviour of the objects. by this there is assessing
of the OO system by its weighted methods.
- Class oriented matrices having the coupling between the
objects and classes. that leads to make an OO system more stable.
Coupling normally refers to the having knowledge of others, Like
One class have all information of other class , so we can retrive
all the information of one class from other class. That leads to
assess that our OO system is either in loose coupling or tight
coupling.
- Subclass , or child class can over write a methode of
its parent class, that known as methode overriding. Class oreinted
matrix have the count of number of the methode that are overriden.
So it assess the number of times in which methode overriding have
been done, that assess that how much the use of the property of
polymorphism is used(as method overriding is the run time
polymorphism). Polymorphism is one of the feature of object
oriented system.
- Class oriented matix also have the knowledge of the
depth of the inheritance tree. Inheritance refers to the access all
the methods or variable of one class from other class. as making
one class as child class of other class(Parent class). So it have
the depth of the inharitance, that ,means it have record that how
many time there is use of the inharitance where used in the
program. IT assess that how much the program uses the inheritance
in its entire structure.