Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the Savings sub-class that follows, create the super-class named ‘Account’

ID: 3916812 • Letter: G

Question

Given the Savings sub-class that follows, create the super-class named ‘Account’: ? Make the Account class abstract. ? Data variables in the Account class are ‘name’ (type String which can be accessed directly by the sub-class but not by the outside world,) and ‘balance’ (type double which cannot be accessed by any sub-class.) ? Add the methods that are referenced in the Savings sub-class. ? Make it so that the ‘deductFees’ method is known to the Account class, but the implementation for deductFees is required to be in the Savings class.

Explanation / Answer

public abstract class Account {

protected String name;

private double balance;

public abstract void deductFees();

}

class Savings extends Account{

@Override

public void deductFees() {

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote