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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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
Transcribed Image Text: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
Part 2: 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.
O 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.
O
O
O
O
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
Transcribed Image Text:Part 2: 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. O 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. O O O O 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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education