Question: JAVA Write an Account Class that implements the interface AccountInterface. public interface AccountInterface { / * * * Deposits the specified amount into the account.
JAVA
Write an Account Class that implements the interface AccountInterface.
public interface AccountInterface
Deposits the specified amount into the account.
Returns the new balance.
@param amount
@return
public double depositdouble amount;
Withdraws the specified amount from the account and applies the fee.
Returns the new balance.
@param amount
@param fee
@return
public double withdrawdouble amount, double fee;
Withdraws the specified amount from the account.
Returns the new balance.
@param amount
@return
public double withdrawdouble amount;
Add the interests to the account and returns the new balance.
The default interest rate is
return the new balance
public double addInterest;
Increases the account balance by and returns the new balance
@return
public double increment;
Decreases the account balance by and returns the new balance
@return
public double decrement;
Returns the owner of the account.
@return
public Person getOwner;
Returns the account number of the account.
@return
public long getAcctNumber;
Returns the current balance of the account.
@return
public double getBalance;
The Account class should have the following fields
owner: Person
RATE: double This should have a value of
balance: double
acctNumber: long
In addition to the methods being inherited from the AccountInterface, the Account class should also have the following constructor:
public AccountPerson owner, long acctNumber, double initialBalance
You will be able to add any helper methods to your Account class.
You also need to create getters and setters for the above fields.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
