Question
1. Create a class called Account. 2. Class contains fields: name (string), account # (string), savings account balance (double), checking account balance (double), loan amount
1. Create a class called Account.
2. Class contains fields: name (string), account # (string), savings account balance (double), checking account balance (double), loan amount (double)
3. Create getters and setters for the account class.
4. Class includes two constructors, an empty constructor, and a constructor that will take in values for each field in the class and set the values to the proper fields.
5. Include a display method to print out all values
6. Create two instances of the Account class :
First Account :
Name: Joe Biden
Account # : 454545454
Saving Account Balance: 4324322.53
Checking Account Balance: 12312312.32
Loan Balance: 1233213.21
------------------------------------------------------------
Second Account:
Name: Donald Trump
Account # : 67876867
Saving Account Balance: 678678.53
Checking Account Balance: 167862312.32
Loan Balance: 1238213.24
------------------------------------------------------------
Use a do-while loop that will allow the user to do one of the 6 choices and with a switch statement:
1. Check Balance
2. Deposit Money
3. Withdraw Money
4. Transfer Money
5. Pay a loan
6. End Program (Exit)
These 6 choices should have their own methods to do the work.
SAMPLE:
Please choose Account to gain entry:
1. Joe Biden
2. Donald Trump
Choice : 1
Welcome, Joe Biden!
Please Choose one of the 6 options below:
1. Check Balance
2. Deposit Money
3. Withdraw Money
4. Transfer Money
5. Pay a loan
6. End Program (Exit)
Choice: 1
Name: Joe Biden
Account # : 454545454
Saving Account Balance: 4324322.53
Checking Account Balance: 12312312.32
Loan Balance: 1233213.21
If choice 2 is chosen :
Which account would you like to deposit to?
1. Savings Account
2. Checking Account
Choice: 1
Deposit: 12412.12
Name: Joe Biden
Account # : 454545454
Saving Account Balance: 4336734.65
Checking Account Balance: 12312312.32
Loan Balance: 1233213.21
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