1:public class CheckingAccount extends BankAccount {
 2:    /** if you get interest from your checking account, you have to pay monthly
 3:    charge */
 4:    private boolean interest; 
 5:    /** constructor */
 6:    public CheckingAccount(String name,  int saving, boolean interest) {
 7:        super(name, saving);
 8:        this.interest = interest;
 9:    }
10:    /** constructor */
11:    public CheckingAccount(String name, boolean interest) {
12:        this(name,0,interest);
13:    }
14:    
15:    /** get monthly charge */
16:    public int getMonthlyCharge() {
17:        if(interest == true) {
18:            return 5;
19:        } else {
20:            return 0;
21:        }
22:    }
23:    
24:    public String showInfo() {
25:        String newLine;
26:        if(interest) {
27:            newLine = "This account has interest.";
28:        } else {
29:            newLine = "This account does not have interst.";
30:        }
31:        return super.showInfo() + "\n" + newLine;
32:    }
33:               
34:}
35: