package lab4out; public class CheckingAccount extends BankAccount { static int num = 0; //Default Constructor public CheckingAccount() { this(0,0); } //Constructor public CheckingAccount( long account_num, double balance) { super(account_num, balance); num++; this.penalty = 0; } // Subtracts amount from the balance and incurs a $15.00 penalty on the account for each overdrawn transaction public void withdraw(double amount) { balance -= amount; if(balance < 0) { balance = 0; penalty += 15; } } // Gets the total number of checking accounts created public static int getNoOfCheckingAccounts( ) { return num; } public static void main(String[] args) { CheckingAccount checkingaccount = new CheckingAccount(); } }