Edit question /*Design an implement a bank account that has the following: * A unique account number (use static int) *
Posted: Mon Jun 06, 2022 5:03 pm
Edit question
/*Design an implement a bank account that has the
following:
* A unique account number (use static int)
* An array of max three account holders (an account holder is a
Person). Index 0 in the array refers
* to the primary account holder. When you create a BankAccount, you
need only to specify the primary account
* holder.
* A balance double
* An interest rate float or double
* Date the account was opened
* Date the interest was last payed.
*
*default constructor that sets all to default, but the account
number has to be valid
*A constructor that accepts, primary holder, intial balance,
interest rate,
*the opening date and date of interest should be today.
* Methods:
* boolean withdraw(double money): returns false if not enough
money, otherwise it deduct the amount from balance
* void deposit(double m): adds m to balance
* toString to print all info of a bankAccount
* boolean addHolder(Person)
* void payInterest(): computes interest based on last date interest
paid and adds it to balance
* void setInterestDate(Date d);
*
*
*/
Computer science
Java
please answer with a code
/*Design an implement a bank account that has the
following:
* A unique account number (use static int)
* An array of max three account holders (an account holder is a
Person). Index 0 in the array refers
* to the primary account holder. When you create a BankAccount, you
need only to specify the primary account
* holder.
* A balance double
* An interest rate float or double
* Date the account was opened
* Date the interest was last payed.
*
*default constructor that sets all to default, but the account
number has to be valid
*A constructor that accepts, primary holder, intial balance,
interest rate,
*the opening date and date of interest should be today.
* Methods:
* boolean withdraw(double money): returns false if not enough
money, otherwise it deduct the amount from balance
* void deposit(double m): adds m to balance
* toString to print all info of a bankAccount
* boolean addHolder(Person)
* void payInterest(): computes interest based on last date interest
paid and adds it to balance
* void setInterestDate(Date d);
*
*
*/
Computer science
Java
please answer with a code