Content deleted Content added
Fixed typo Tags: Mobile edit Mobile web edit |
Streamlined text and corrected grammar and punctuation |
||
Line 1:
{{Distinguish|Computational complexity theory}}'''Programming complexity''' (or '''software complexity''') is a term that includes
The idea of linking software complexity to ==Measures==
* [[cyclomatic complexity|McCabe's cyclomatic complexity metric]]
* [[Halstead complexity measures|
* Henry and Kafura introduced "Software Structure Metrics Based on Information Flow" in 1981,<ref>Henry, S.; Kafura, D. IEEE Transactions on Software Engineering Volume SE-7, Issue 5, Sept. 1981 Page(s): 510 - 518</ref> which measures complexity as a function of "fan
* Chidamber and Kemerer introduced "A Metrics Suite for Object-Oriented Design" in 1994,<ref name=":0">Chidamber, S.R.; Kemerer, C.F. IEEE Transactions on Software Engineering Volume 20, Issue 6, Jun 1994 Page(s):476 - 493</ref>
* Branching complexity (Sneed Metric)
* Data access complexity (Card Metric)
Line 19 ⟶ 21:
==Types==
#'''Accidental complexity
#'''Essential complexity
==Chidamber and Kemerer Metrics==
{{Prose|date=August 2017}}
Chidamber and Kemerer<ref name=":0" /> proposed a set of programing complexity metrics
*
** <math>WMC = \sum_{i=1}^nc_i</math>
** n is the number of methods on the class
** <math>c_i</math>is the complexity of the method
*
** number of other class which is coupled (using or being used)
*
** <math>RFC = |RS|</math> where
** <math>RS = \{M\}\cup_{all\ i} \{R_i\}</math>
** <math>R_i</math> is set of methods called by method i
** <math>M</math> is the set of methods in the class
*
** sum of all classes that inherit this class or a descendant of it
*
** maximum depth of the inheritance tree for this class
*
** Measures the intersection of the attributes used in common by the class methods
** <math>LCOM = \begin{cases} |P| - |Q|, & \text{if } |P| > |Q|
|