Help stuck with Java. Do not use the case statement. accountNumber (int) accountHolderName (string) : Name of the person who holds the account with “FirstName MiddleInitial. LastName” balance (double): interestRate(double) Write a class called BankAccountClient.java to test the BankAccount.java. In this client class, you should create an instance of the BankAccount class, sets its fields, and call all methods you implemented in BankAccount.java. -Create at least 3 BankAccount objects using both constructors and pass in account information. -Use while loops to keep the program running until the user chooses to exit. -Use a static method to display a menu of options for the user to choose from. -Use a static method to get the user’s input and validate the user inputs accordingly (For example, accountHolder Name should be in the form of “FirstName MiddleInitial. LastName” ) - Call the appropriate methods of the BankAccount object based on the user’s choice. - Make sure to include error checking and validation for user input (invalid input or insufficient funds). Here is an example menu for your client code: 1. Display information of an account 2. Deposit to an account 3. Withdraw from an account 4. Transfer between two accounts 5. Calculate Interest 6. Get the balance of an account 7. Change Account Details (Name) 8. Exit
Help stuck with Java. Do not use the case statement.
accountNumber (int)
accountHolderName (string) : Name of the person who holds the account with “FirstName MiddleInitial. LastName”
balance (double):
interestRate(double)
Write a class called BankAccountClient.java to test the BankAccount.java. In this client class, you should create an instance of the BankAccount class, sets its fields, and call all methods you implemented in BankAccount.java.
-Create at least 3 BankAccount objects using both constructors and pass in account information.
-Use while loops to keep the program running until the user chooses to exit.
-Use a static method to display a menu of options for the user to choose from.
-Use a static method to get the user’s input and validate the user inputs accordingly (For example, accountHolder Name should be in the form of “FirstName MiddleInitial. LastName” )
- Call the appropriate methods of the BankAccount object based on the user’s choice.
- Make sure to include error checking and validation for user input (invalid input or insufficient funds).
Here is an example menu for your client code:
1. Display information of an account
2. Deposit to an account
3. Withdraw from an account
4. Transfer between two accounts
5. Calculate Interest
6. Get the balance of an account
7. Change Account Details (Name)
8. Exit
![Part 1: Write a class called BankAccount.java with the following specifications:
Fields (You should encapsulate all data inside your objects)
O account Number (int) : A unique identifier for the account
O accountHolderName (string) : Name of the person who holds
the account with "FirstName MiddleInitial. LastName"
O balance (double): the amount of money in the account
O interestRate (double): the interest rate
Methods
Default constructo
O
O
O
O
sets the accountNumber to 0
sets the balance to 0.0
sets the account HolderName to
sets the interestRate to 0.0
Full constructor
O
A constructor for the Bank Account class that takes the account number, account
holder name, balance, and interestRate as parameters.
String toString()
returns a string in the format as follows:
O accountHolderName : accountHolderName [accountNumber] :: Balance:
$balance
O Example: Kurt D. Cobain [12345]:: Balance: $105.5](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F81fcbcae-c7c7-47f7-b9b9-962fae442be8%2F38d97110-c586-48c7-a9c0-79ec0d332497%2F5aepwzs_processed.png&w=3840&q=75)


Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images









