Someone help me fix/finish this
hey need help finish this class
i use testpad lol
need make a method should display summary of the accounts details (e.g. account number, account balance and account owners name)
Also I think I messed up.
so tell me if i did.
//class for Account
public class Account
//stores account number
private int accountNumber;
//stores the money in account
private float accountBalance;
// owner of the accounts first name and last name
private String accountOwner;
final float INTEREST_RATE;
//Method credit should add the amount to the current balance
public void credit(float amount)
accountBalance = accountBalance + amount;
//Method debit should withdraw money from an account object e.g. should subtract an amount from the account’s balance.
public void debit(float amount)
accountBalance = accountBalance - amount;
//method addInterest should calculate interest and add it to the account’s balance. Declare the interest rate as a constant
public void addInterest()
accountBalance = (accountBalance * INTEREST_RATE) + accountBalance;
//Method getBalance should return the current balance
public float getBalance()
//Method getAccNumber should return the account number.
public int getAccNumber()
public String getName()
//should display summary of the accounts details
Thank for helping