mercredi 25 février 2015

Savingaccount java



"In the SavingsAccount class add an annual interest rate and a method to recalculate the balance every month. Since the interest rate is annual, make sure to calculate the interest accordingly. In the SavingsAccount class, if the current balance is less than $100.00, display an “account balance low” warning message along with the balance. Additionally, subtract $5.00 from the account balance as a fine for the low balance".


public class SavingAccount extends Account


{ double interest;



double balance;
double total;
double balance (double Balance)
{
if(Balance < 100 )
{
total = Balance -5;
return total;
}
public String to String()
{
return (" account balance low " + total);
}


}


1- problem can some one help me to create the method to recalculate the balance every month? thanks!




Aucun commentaire:

Enregistrer un commentaire