cr5/6-design

Next: * cr5/6-tradeoff Prev: * cr5/6-oracle Up: * cppR 5/6

pp 12-16
Object-oriented design
Designing with exceptions
by Grady Booch and Michael Vilot

C++ Programming Language
Exception handling is a less structured mechanism than the more
localized control structures, such as if and for, and often far
less efficient in the case where an exception is actually
thrown. Therefore exceptions should be used only when the more
traditional control structures are inelegant or impossible to
use.

Four kind of exceptions emerged:
- truly fatal errors
- preconditions/invariant failures
- algorithmic failures
- alternate return signals

Reference:
Barbara Liskov & John Guttag
Abstraction and Specification in Program Development
MIT Electrical Engineering and Computer Science Series
MIT Press, Cambridge 1986

Within a data abstraction implementation, will be information
indicating that the objects belonging to the abstract type are
to be implemented as objects of an other data type, the concrete
type.

Three 'scopes' in this model:

         ^  Operations,
         |   Values
         v
 ------------------
|    Abstraction   |     abstract semantics
 ------------------ 
    |         ^
    |         |          mapping functions
    v         |
 ------------------
|  Representation  |     representation invariant
 ------------------
         ^
         |  Resources
         v


automatically generated by info2www version 1.2.2.8