Java Exception Handling
CS2 / Java
Abstract
This activity teaches the students to handle abnormal program execution in Java programming language. The students interact with a working Java program that executes abnormally, then compare this program to an alternate version, which handles exceptions. Based on this information, the students derive a generic mechanism for exception handling in Java. In the last section, students explore Java exceptions in the context of polymorphism with inheritance and derive rules for how to handle multiple exceptions in the same block of code. After completing this activity, the students will be able to handle abnormal program execution with exceptions, and explain how polymorphism is utilized in the Java exception handling mechanism.
This activity was developed with NSF support through IUSE-1626765. You may request access to this activity via the following link: IntroCS-POGIL Activity Writing Program.
Level: undergraduate
Setting: computer classroom
Activity type: Learning Cycle
Discipline: Computer Science
Course: CS2 / Java
Keywords: exception handling
Downloads
Published
How to Cite
Issue
Section
License
Copyright of this work and the permissions granted to users of the PAC are defined in the PAC Activity User License.