Title: Module 11 - Exceptions
Course: COP 2551 Intro to Object Oriented Prog > Section: Module 11 - Exceptions

Introduction

Exceptions are events that occur as a program is executing. Sometimes this is due to an exceptional situation, one that happens rarely. Other times an erroneous situation occurs and execution will halt. How exceptions are handled is an important part of an objectoriented program.

The Java language has various ways to handle exceptions when they occur. In this module, you will explore the class hierarchy from the Java standard library used to define exceptions, as well as the ability to define your own exception objects. This module also presents the use of exceptions when dealing with input and output, and examines an example that writes a text file.

Objectives

Upon completion of this module, the student will be able to:

- Discuss the purpose of exceptions.
- Examine exception messages and the call stack trace.
- Examine the try-catch statement for handling exceptions.
- Explore the concept of exception propagation.
- Describe the exception class hierarchy in the Java standard class library.
- Explore I/O exceptions and the ability to write text files.

Readings & Resources

Chapter 11, Sections 1 - 6 Java Software Solutions: Foundations of Program Design, 8^th Ed., John Lewis and William Loftus.

Assignments and Activities

- Complete the Module 11 Ungraded Activities
- Complete the Module 11 Ungraded Quiz