Which metric(s) show the difference between object-oriented and procedural code?

Some just out of my mind relative number of interfaces, abstract classes, etc. (more OO) member variable usage per method (more OO) number of methods in which the same member variable is used (more OO) quantity of static variables and methods (more procedural, specially static methods (some exceptions apply, like factories)) lines of code per class (more procedural) These don't ensure your code is more OO or more procedural, but might find helping those.

Cohesion and Coupling Metrics focused on cohesion and coupling should give a good indication that your classes are real as opposed to collections of functions. There's a very readable paper here which I quote below to indicate why I think cohesion is a good metric: "Cohesion refers to the relatedness" of module components. A highly cohesive component is one with one basic function.It should be difficult to split a cohesive component.

Cohesion can be classified using an ordinal scale that ranges from the least desirable category (coincidental cohesion) to the most desirable (functional cohesion). " The classic measurement of cohesion is Chidamber and Kemerer's "Lack of Cohesion in Methods" (LCOM). You can also look at Response for a Class (RFC) which measures the linkage between methods in a class.

You could consider design metrics such as NOC and DIT but my own experience is that they are too crude and easily confused by classes within a third-party framework. You haven't said which language you use but there are some tools built around Eclipse so a quick web search for Eclipse based object oriented metrics should yield something useful.

Link appears dead – Maslow Apr 6 at 0:27.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions