Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

9 Cards in this Set

  • Front
  • Back

lines-of-code metric

counting the number of lines in the description

Cyclomatic-complexity metric (McCabe 1976)

-counting the number of independent paths through a method body

- always counted from 1

- count :


- do while

- for

- switch

- try

- &&

- ||

-not to count:

- default case

- final block

- the CC of 10 or more is too complex needs to be restructured

object-oriented metrics

-2 types

- measure method complexity

- measure the complexity of the class structure

depth-of-inderitance-tree (DIT)

the maximum number of hops we can make sarting at the class in question and moving up the inheritance tree until reaching a class or interface from which we can go no further

- only efficient measure for single inheritence

coupling-between-objects (CBO)

defined as the number of relationships the class has with other classes

- the more relationships it has the more difficult to understand


defined as a number of immediate children for that class

- measures the number of the classes that will be affected by changes to a given parent class

response-for-a-class (RFC)

defined as the size of the response set for the class, which consists of all the methods and constructors of this class (including inherited methods) together with all the methods and constructors that are invoked within this class on objects of other classes
- measures the number of methods needed to understand a class

lack-of-cohesion-in-methods (LCOM)

a class should represent a single domain concept

- defined as the number of pairs in methods that do not make reference to the same attributes minus the number of pairs of method that do


- it measures the class' complexity of behaviour

- defined as the sum of the cyclomatic complexities of each method of the class measured against the number of classes in each method