Chapter 4

  1. Software quality may be characterized with respect to external characteristics, such as correctness and robustness. However, also structural characteristics, which determine maintenance, reuse and compatibility may be considered important as well. See slide 4-quality.
  2. An example is given in slides sli-4-ex-inh-1 and sli-4-ex-inh-2. Inherited code may need to be retested because a subclass may affect inherited instance variables and because a superclass may use virtual methods that are redefined in a subclass.
  3. Within an object-oriented approach, we may distinguish between the levels of individual methods, objects, a collection of objects and the system level. See slide 4-levels.
  4. Testing the behavior of objects involves checking whether invoking methods results in appropriate object state transitions. A more abstract approach to testing consists of checking sequences of operations resulting in identity transitions. See slide 4-identity.
  5. Contracts may be used to establish runtime consistency characteristics. Testing runtime consistency amounts to checking object invariants and method pre- and post-conditions.
  6. See slide 4-static.
  7. A number of metrics are listed in slide 4-suite. These metrics pertain to the definition of object classes and the relation between classes.
  8. A number of criteria are listed in slide 4-evaluation. Some of these criteria give counter-intuitive results with respect to common opinions concerning object oriented design. Empirical validation is needed before applying any metric in actual development project.
  9. See slides sli-4-WMC -- sli-4-LCO.
  10. See slide 4-demeter. The intuition underlying the Law of Demeter is essentially that ignorance of how a class is implemented is beneficial for understanding and maintenance.
  11. See slide 4-good.
  12. A formal specification must characterize the requirements of a system and must also provide guidelines for its validation. Contracts may be used to specify invariant consistency properties that may be tested at runtime. See slide 4-formal.