/*Design an implement a bank account that has the following: * A unique account number (use static int) * An array of

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

/*Design an implement a bank account that has the following: * A unique account number (use static int) * An array of

Post by answerhappygod »

/*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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply