/** * Title: Chapter 13, "Exception Handling" * Description: Examples for Chapter 13 * Copyright: Copyright (c) 2000 * Company: Armstrong Atlantic State University * @author Y. Daniel Liang * @version 1.0 */ // NegativeAmountException.java: Negative amount exception // package chapter13; public class NegativeAmountException extends Exception { /**Account information to be passed to the handlers*/ private Account account; private double amount; private String transactionType; /**Construct an negative amount exception*/ public NegativeAmountException(Account account, double amount, String transactionType) { super("Negative amount"); this.account = account; this.amount = amount; this.transactionType = transactionType; } }