public class BankAccount
{
private double balance;
public BankAccount()
{ balance = 0; }
public BankAccount(double acctBalance)
{ balance = acctBalance; }
public void deposit(double amount)
{ balance += amount; }
public void withdraw(double amount)
{ balance -= amount; }
public double getBalance()
{ return balance; }
}
public class SavingsAccount : BankAccount
{
private double interestRate;
public SavingsAccount()
{ /* implementation not shown */ }
public SavingsAccount(double acctBalance, double rate)
{ /* implementation not shown */ }
public void addInterest() //Add interest to balance
{ /* implementation not shown */ }
}
public class CheckingAccount : BankAccount
{
private const double FEE = 2.0;
private const double MIN_BALANCE = 50.0;
public CheckingAccount(double acctBalance)
{ /* implementation not shown */ }
/** FEE of $2 deducted if withdrawal leaves balance less
* than MIN_BALANCE. Allows for negative balance. */
public void withdraw(double amount)
{ /* implementation not shown */ }
}
Which is a correct implementation of the CheckingAccount constructor?
I super(acctBalance);
II super();
deposit(acctBalance);
III deposit(acctBalance);
(A) I only
(B) II only
(C) III only
(D) II and III only
(E) I, II, and III