20-CS-122-001 Computer Science II Spring 2012
Exceptions

Virtual functions, classes, inheritance, lists, queues, stacks, applications

Examples
     test1.cc      Define a division by zero exception and throw it
     test2.cc      Subclass the exception class and throw it
     test3.cc      Throw a built-in exception - vector index out-of-bounds
     test4.cc      Throw a built-in exception - allocation error
     test5.cc      Long distance handling of the exception
     escape.cc      Escape from a lengthy multiplication if a 0 is ecountered

Puzzle classes
     exceptions.h      Declare Up and Out exceptions
     variable.h      Abstract class - requires implementing val and check_constraints
     choose.h      Subclass of Variable - cycles through a set of values
     choose.cc      and passes control to a Variable one level deeper
     boolexp.h      Define assertion, helper functions such as distinct,
     boolexp.cc      equals, leftOf, neighborOf
     aux.h      Auxilliary functions
     aux.cc      Implementation

Puzzles
     kalotan.cc      Determine the sex of a kid by asking questions of its parents
     colors.cc      Color countries of Europe so no two adjacent ones have the same color
     usman.h      Classic who keeps the fish as a pet puzzle
     usman.cc      Implementation
     constraint.h      Allows for neater assertions
     constraint.cc      Implementation