Rlab5

mike05
CheckingsAccount_Dawadi.java

//CheckingsAccount_Dawadi.java class CheckingsAccount_Dawadi extends Accounts_Dawadi { public double serviceFee; public CheckingsAccount_Dawadi() { super(); } public CheckingsAccount_Dawadi(String acc, String nam, double bal,double fee) { super(acc,nam,bal); serviceFee = fee;//variables for user input of the following } public void openAccount() { System.out.println("Account Type: Checking Account"); super.openAccount(); //opens new account } public void checkBal() { System.out.println("Account Type: Checking Account"); super.checkBal(); //checks balance in the account } public void deposit(double amount) { System.out.println("Account Type: Checking Account"); super.deposit(amount); //deposits money to each account } public void withdraw(double amount) { System.out.println("Account Type: Checking Account"); super.withdraw(amount); //subtracts withdrawn money } public void calculateFee() { super.balance-=super.balance*serviceFee*0.01; } //calculates interest rate on the account public void printStatement() { calculateFee(); System.out.println("Account Type: Checking Account"); System.out.println("Service Fee: "+serviceFee); super.printStatement(); } }