java code

Wernerrab
SavingAccount_Acharya.java

//SavingAccount_Acharya.java package Pack; //SavingAccount_Acharya.java public class SavingAccount_Acharya extends Account_Acharya{ //SavingAccount_Acharya.java public double intsestRate ; public SavingAccount_Acharya () { super (); } public SavingAccount_Acharya ( String var , String first , double second , double ints ) { account_number = var ; // Declaring variables Username = first ; balance = second ; // Declaring variables intsestRate = ints ; //variables for user input } public void openAccount () { System . out . println ( "Account Type: Saving Account" ); super . openAccount (); //for new Account } public void checksecond () { System . out . println ( "Account Type: Saving Account" ); super . checksecond (); //checks balance in the Account } public void deposit ( double amount ) { System . out . println ( "Account Type: Saving Account" ); super . deposit ( amount ); //deposits amount to each Account } public void withdraw ( double amount ) { System . out . println ( "Account Type: Saving Account" ); super . withdraw ( amount ); //reduce withdrawn amount } public void calculateInterest () { super . balance += super . balance * intsestRate * 0.01 ; } //calculates interest rate on the Account public void printStatement () { calculateInterest (); System . out . println ( "Account Type: Saving Account" ); System . out . println ( "intsest Rate: " + intsestRate ); super . printStatement (); } }