Next: Visibility Component of
Up: Metric Definition
Previous: Terminology
-
Explicit parameter - An object that is explicitly declared in the
method signature, see Figure 1.
-
Implict parameter - An object that is visible to the method by
virtue of the fact
that it is declared as a class or instance variable in the class declaration.
Not all of the data attributes
in the class are visible to all the methods in the class.
Syntactically all the protected and the public attributes are visible to a
derived class
during inheritance. Therefore the implicit parameters for a derived class
includes
the attributes of the base class that are visible to the derived class.
A detailed set of counting
rules for parameters are presented in section 3.7.
-
Constant Object - A constant object is one that does not change
its state during the execution of the method. These consist of objects
that are made state invariant syntactically by definition, such as const
objects in C++ or final objects in Java.
-
Constant method - A constant method is one that does not
modify any objects. This includes implicit and explicit
parameters.
An explicit parameter can be either a modifiable or
an inspectable object with respect to a specific method. The classification is
determined by whether the object changes its
state during the execution of the method. For the implementation of the
metric being presented in this paper, all the implicit parameters are
assumed to be modifiable objects. This metric is applied to
the specification of a class which will not provide sufficient information to
determine which of the implicit parameters might be modified. This
assumption will make our metric value an upper bound on the effort
estimation.
The attributes that are available for calculating the testability metric are the
attributes defined in the class, the parameters declared in the method
signatures and the attributes that are visible to the methods due to inheritance
and aggregation.
Next: Visibility Component of
Up: Metric Definition
Previous: Terminology
John McGregor
Sun May 5 14:43:24 EDT 1996