Question
Project Number: Review Project Project Name: Bank Accounts Chapter Review: Chapters 1-5 Assistance: This assignment should be completed without assistance from others. If you cannot
Project Number:
Review Project
Project Name:
Bank Accounts
Chapter Review:
Chapters 1-5
Assistance:
This assignment should be completed without assistance from others. If you cannot code this program successfully, i.e., without assistance from others, we recommend withdrawing from this course and retaking CSC120 or CSC143.
Points:
This assignment is not part of your total points in this course. You will not see a grade in the gradebook. This is only an attendance assignment.
Instructions:
IMPORTANT: Please read the instructions in there entirety before starting to write code!
Write a program that will:
1. Get bank account information that is typed in the keyboard by the user. The program should ask the user for the following pieces of information:
-
- Account Number
- Account Type ( "Savings" or "Checking")
- Customer Name
- Account Balance
2. Determine the monthly fee for the account. The monthly fee is calculated in the following way:
-
- Savings accounts have no monthly fee.
- Checking accounts have a monthly fee equal to 0.1 percent of their account balance.
For example, a Checking account with a balance of $15,000 has a monthly fee of $15000 * .001 = $15
3. Display all of the information (including the monthly fee) for the account.
4. Ask the user if they wish to enter information for another account.
5. Calculate and display the total amount of money deposited in all the accounts
Apply the divide and conquer approach to your program to break the problem it solves into smaller problems. The program must contain the following methods:
- A method that prompts the user to input the account number, reads in the user's input, and returns it.
- A method that prompts the user to select the account type from a menu, reads in the user's selection, and returns it. The user's selection must be validated. Only accept valid menu options.
- A method that prompts the user to input the customer name, reads in the user's input, and returns it
- A method that prompts the user to input the account balance, reads in the user's input, and returns it. The user's input must be validated. Do not accept negative accounts balances.
- A method that determines the monthly fee
- A method that displays the account number, account type, customer name, account balance, and monthly fee
Do not create methods for asking the user if they wish to enter information for another account or for calculating and displaying the total amount of money deposited in all accounts.
All variables and constants should be declared as local variables (inside of the method in which they are used).
Use only what you've learned in Chapters 1 - 5 to solve this problem.
Submit the assignment through Blackboard for attendance purposes. Submit ONLY the source code (".java" extension file). Do NOT submit the bytecode (".class" extension file), text files, or image files.
The assignment is worth 0 points but you will be provided a solution after the due date if you submit your attempt.
Sample Input and Output (user input is in bold)
Please enter the Account Number: 12345
1. Checking
2. Savings
Select an Account Type from the menu above: 1
Please enter the Customer's Name: Bob Doe
Please enter the Account Balance: 10000
Account Number: 12345
Account Type: Checking
Customer Name: Bob Doe
Account Balance: $10,000.00
Monthly Fee: $10.00
Do you wish to enter information for another account? (Y/N): Y
Please enter the Account Number: 54321
1. Checking
2. Savings
Select an Account Type from the menu above: 2
Please enter the Customer's Name: Jane Doe
Please enter the Account Balance: 575
Account Number: 54321
Account Type: Savings
Customer Name: Jane Doe
Account Balance: $575.00
Monthly Fee: $0.00
Do you wish to enter information for another account? (Y/N): N
The total balance of all accounts is: $10,575.00
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