/* * NegativeAmount.java * * Created on August 16, 2002, 3:03 PM */ package bankThreaded; /** * * @author mike */ public class NegativeAmount extends java.lang.Exception { private double amount = 0; /** * Creates a new instance of NegativeAmount without detail message. */ public NegativeAmount() { } /** * Constructs an instance of NegativeAmount with the specified detail message. * @param msg the detail message. */ public NegativeAmount(String msg) { super(msg); } /** * Constructs an instance of NegativeAmount with the specified detail message. * @param msg the detail message. */ public NegativeAmount(String msg, double amt) { super(msg); amount = amt; } /** * To obtain the amount that was negative and shouldn't have been */ public double getAmount () { return amount; } }