(Solved) : Java Program Bank Accounts Using Arraylists Hired Programmer Major Bank First Project Smal Q40439661 . . .

JAVA PROGRAM : Bank Accounts: UsingArrayLists

You have been hired as a programmer by a major bank. Your firstproject is a small banking transaction system. Each accountconsists of a number and a balance. The user of the program (theteller) can create a new account, as well as perform deposits,withdrawals, balance inquiries, close accounts, etc.(Note: Someadditional features have been added for this assignment.)

For this assignment, you must use Classes andmove functionality into the classes. Specifically, you should haveat least the following classes:

1. A Bank class which consists of anArrayList of Accounts currently active orclosed.

2. An Account class which consists of aDepositor, an account number, an account type, accountstatus (open or closed), account balance, an ArrayList ofTransactions performed on the account. (Note: creating an accountis considered a transaction.)

3. A Depositor class which has a Nameand a social security number.

4. A Name class which consists of firstand last names.

5. A DateInfo class which consists ofyear, month, and dayOfMonth data members.

6. A Transaction class which consists of atransaction type (e.g., create, deposit,withdrawal, balance, etc.), a transaction amount(where applicable), a transaction date, asuccess indicator, and if unsuccessful,areason for failure.

As before, you must implement appropriate methods in each classso as to implement the functionality required. New methods are tobe added as necessary.

The data members of each class must be private. As such, you mayneed to provide accessor and mutator methods as necessary.

Remember, all I/O should be done only in the methods ofthe class that contains the main() method.

As in previous assignments, initially, the account informationof existing customers is to be read into the database.(Note: the ArrayList of Accounts will grow dynamically aseach account is created.) The program keeps tracks of theactual number of currently active accounts. A table of theinitial database of active accounts should be printed.

As before, the program then allows the user to select from thefollowing menu of transactions:

Select one of the following:

W – Withdrawal

D – Deposit

C – Clear Check

N – New account (NOTE: the ArrayList of Accounts will grow whenyou create a new Account)

B – Balance

I – Account Info (without transaction history) (NOTE: include atleast one depositor who has multiple accounts)

H – Account Info plus Account Transaction History

S – Close Account (close (shut), but do not delete the account)(Note: no transactions are allowed on a closed account)

R – Reopen a closed account

X – Delete Account (close and delete the account from thedatabase)) (NOTE: must have zero balance to delete)

Q – Quit

Note 1: The Clear Check transaction is onlyvalid for checking accounts. It is like a withdrawal; except, youmust also check the date of the check. You may only clear a checkif the date on the check is no more than six months ago. Nopost-dated checks (checks with a future date) may be cleared. Usethe DataeInfo class to implement this. In addition, a check willclear only if there is sufficient funds in the account. If theaccount lacks sufficient funds, the check will not clear and theaccount will be charged a $2.50 Service Fee for “bouncing” acheck.

Note 2: CD accounts will now contain a MaturityDate. Deposits and Withdrawals will be allowed only on or after thematurity date. When a deposit or withdrawal is made, have the userselect a new maturity date fro the CD. the choices are either 6,12, 18, or 24 months from the date of the deposit or withdrawal.Again, use the DateInfo class to implement this.

Note 3. Use the Calendar class to assist you inimplementing the DateInfo class.

Once the user has entered a selection, appropriate methods (inthe class that contains the main() method) should be called toperform the specific transaction. These methods will call the classimplemented methods as necessary. At the end, before the userquits, the program prints the contents of the final database.

As in previous assignments, make sure to use enough test casesso as to completely test program functionality. Make sure thatthere is at least one depositor that has multiple accounts at thebank.

Once the user has entered a selection, appropriate methodsshould be called to perform the specific transaction. Atthe end, before the user quits, the program prints the contents ofthe database. You should also print the transaction history foreach account in the database.

As in previous assignments, make sure to use enough testcases so as to completely test program functionality

Please refer to the previous assignments as anoutline!

Link: Assignment 1

https://www.chegg.com/homework-help/questions-and-answers/hired-programmer-major-bank-first-project-small-banking-transaction-system-account-consist-q34844652?trackid=5RBrq5Bp

Link: Assignment 2

https://www.chegg.com/homework-help/questions-and-answers/java-program-bank-accounts-using-classes-constructors-methods-hired-programmer-major-bank–q35500077?trackid=5RBrq5Bp

*If possible, please provide 1 test case and 1 sampleoutput, that would be very appreciated!

——————————————————————————————————————————————————————————

Minimal Class Requirements:

1a. The Bank class should at least have a default(No-Arg) constructor that would allow statements of theform:

Bank bank = new Bank(); //implements a No-Arg Constructor

1b. The Bank class should have at least have thefollowing methods:

public int openNewAcct(…) (return value indicates success orreason for failure)

public int deleteAcct(…) (return value indicates success orreason for failure)

public int findAcct(…) (return value indicates index of foundAccount or reason for failure)

public Account getAcct(…) Public int getNumAccts(…) publicvoid setAcct(…)

2a. The Account class should at least have a constructorthat would allow statements of the form:

Account account = new Account(…); //implement both a No-Argand a Parametized Constructor

2b. The Account class should have at least the followingmethods:

public double getBalance(…)

public int makeDeposit(…) (return value indicates success orreason for failure)

public int makeWithdrawal(…) (return value indicates successor reason for failure)

public int clearCheck(…) (return value indicates success orreason for failure)

public boolean closeAcct() public boolean reopenAcct()

public Depositor getDepositor(…)

public int getAcctNumber(…)

public String getAcctType(…)

public ArrayList getTransactions()

public void setDepositor(…)

public void setAcctNumber(…)

public void setAcctType(…)

public void addTransaction()

3a. The Depositor class should at least have aconstructor that would allow statements of the form:

Depositor depositor = new Depositor(…); //implement both aNo-Arg and a Parametized Constructor

3b. The Depositor class should at least the followingmethods:

public Name getName(…)

public String getSSN(…)

public void setName(…)

public void setSSN(…)

4a. The Name class should at least have a constructorthat would allow statements of the form:

Name name = new Name(…); //implement both a No-Arg and aParametized Constructor

4b. The Name class should at least the followingmethods:

public String getFirstName(…) public StringgetLastName(…)

public void setFirstName(…)

public void setLastName(…)

5a. The DateInfo class should at least have aconstructor that would allow statements of the form:

DateInfo date = new DateInfo(…); //implement both a No-Arg anda Parametized Constructor

5b. The DateInfo class should at least the followingmethods:

public int compareDate(…) //used to compare two DateInfoobjects – returns signal to indicate result of comparison

public int getYear(…)

public int getMonth(…)

public int getDayOfMonth(…)

public void setYear(…)

public void setMonth(…)

public void setDayOfMonth(…)

6a. The Transaction class should at least have aconstructor that would allow statements of the form:

Transaction transaction = new Transaction(…); //implement botha No-Arg and a Parametized Constructor

6b. The Transaction class should at least the followingmethods:

public String getTransactionType(…)

public double getTransactionAmount(…)

public boolean getTransactionSuccessIndicator(…)

public String getTransactionFailureReason(…)

public void setTransactionType(…)

public void setTransactionAmount(…)

public void setTransactionSuccessIndicator(…)

public void setTransactionFailureReason(…)

7. The class containing the main() method should have atleast the following methods:

public static void main(String[] args)

public static void readAccts(…)

public static void printAccts(…);

public static void menu(…)

public static void balance(…);

public static void deposit(…);

public static void withdrawal(…);

public static void clearCheck(…);

public static void acctInfo(…);

public static void acctInfoHistory(…);

public static void newAcct(…);

public static void closeAcct(…);

public static void reopenAcct(…);

public static void deleteAcct(…);

8. All I/O should be done only in the methods of theclass that contains the main() method

 

Expert Answer


Answer to JAVA PROGRAM : Bank Accounts: Using ArrayLists You have been hired as a programmer by a major bank. Your first project i…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us