Java Exception Handling

CS2 / Java

Authors

  • Kate Holdener Saint Louis University

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

2023-01-08

How to Cite

Holdener, K. (2023). Java Exception Handling: CS2 / Java. POGIL Activity Clearinghouse, 3(4). Retrieved from https://pac.pogil.org/index.php/pac/article/view/301

Issue

Section

CS-POGIL Activity Writing Program