        // Maintain a negative Transaction amount.
        // Format the amount in a width of 50 characters.
public class Debit extends Transaction {
    public Debit(long amount) throws InvalidTransactionException {
        super(amount);
        if(amount >= 0){
            throw new InvalidTransactionException(
                        "Debits must be less than zero: "+amount);
        }
    }

    protected int getFormatWidth(){
        return debitFormatWidth;
    }

    // The width of the print field.
    private final int debitFormatWidth = 50;
}
