Question
Can someone please help me write this in JAVA code? Bank application Write a program that allows the user to create and process bank account
Can someone please help me write this in JAVA code?
Bank application
Write a program that allows the user to create and process bank account information for a customer. The user can create a new account, add money to the account, calculate interest, deduct money from the account, and print the balance information. In addition, the user can also update most information for a given bank account.
You must use two classes in this program one class containing your main method and another class to store and process the account information. Please refer to the UML diagram and description on the next page for specifics regarding the BankAccount class. All other logic should belong in the class with your main method.
Menu to be displayed for the user:
ACCOUNT PROCESSING MENU
1. Create new account empty account
2. Create new account information available
3. Make deposit
4. Make withdrawal
5. Calculate monthly interest
6. View account balance
7. Next available account number
8. Update monthly interest rate
9. Print account information
10. Exit
Note: To indicate the menu option, the user will enter the number of the menu option, NOT the menu action. For example, if the user wants to create a new account, he/she would type 1 (not Create new account). Please refer to the Sample Output file for full details of what the program should look like when it runs. Additional details follow regarding the different methods of BankAccount and features of the main program.
Be sure to implement the following menu items as follows for full credit:
When creating a new empty account (option #1), you MUST use the default constructor of BankAccount to create the new account object. Set the value of the account number (nAccountNumber) using the next account number (nNextAccountNumber) in this constructor. Be sure to increment the value of nNextAccountNumber after you set the value for the current account. For example, if nAccountNumber = 0 and nNextAccountNumber = 123 when the account is created, after the constructor runs nAccountNumber = 123 and nNextAccountNumber = 124.
When creating a new account with information (option #2), you MUST use the overloaded constructor of BankAccount to create the new account object. Set the value of the account number (nAccountNumber) using the next account number (nNextAccountNumber) in this constructor. Be sure to increment the value of nNextAccountNumber after you set the value for the current account. For example, if nAccountNumber = 0 and nNextAccountNumber = 123 when the account is created, after the constructor runs nAccountNumber = 123 and nNextAccountNumber = 124.
2
UML Diagram for the BankAccount class BankAccount |
-nAccountNumber: int |
-nNextAccountNumber: int -dBalance: double |
-dMonthlyInterestRate: double |
+BankAccount() |
+BankAccount(dStartBalance: double, dIntRate: double) |
+getAccountNumber(): int |
+getBalance(): double |
+getMonthlyInterestRate(): double |
+setMonthlyInterestRate(dRate: double): void |
+getNextAccountNumber(): int |
+printBankInfo(): void |
+makeDeposit(dDepositAmt: double): void |
+makeWithdrawal(dWithdrawalAmt: double): boolean |
+monthlyInterest(): double |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started