/** Class to represent a Deposit. @author Bert G. Wachsmuth @version Feb. 2002 */ public class Deposit extends Transaction { /** This constructor constructs a new deposit and increments the static variable numDeposits. */ public Deposit(String name, double amount, String date) { super(name, amount, date, "Deposit"); numDeposits++; } /** Destructor is called when an object is recycled by Java's automatic garbage collection process. */ public void finalize() { numDeposits--; } }