CS 101 Lecture 28 - Exceptions

Class Examples:

  1. A "fragile" version of the ColorMixer program from a few weeks ago (Lecture 15):

    Click on FragileColorMixer to show the example.

  2. A "safer" version that checks for integer input in the correct range:

    Click on SaferColorMixer to show the example.

  3. A safer version that catches exceptions and displays their message:

    Click on ExceptionColorMixer to show the example.

  4. A "forgiving" version that demonstrates exception handling:

    Click on ForgivingColorMixer to show the example.