Question
(Bank Account) Write a program that inputs in the full name, street address, city, state, zip code, and social security for a new account. In
(Bank Account)
Write a program that inputs in the full name, street address, city,
state, zip code, and social security for a new account. In addition, it inputs in the
initial account balance and allows the user to make one deposit followed by two
withdrawal transactions. Of course, if any of the withdrawal transactions would
cause a negative account balance, your program should display an error message
and exit. Also, you have to validate all the users input. For example, the zipcode
must be 5 digits, the ssn is 9 digits with - as the separator, and all strings must not
be empty.
Your program should calculate the ending balance after the withdrawal and deposit
made by the account holder. It should also find the count of each one of these bills
$100, $20, $10, $5, and $1 in the ending balance.
Your program should then output all the collected data and the calculated results
in three main sections as shown in the Screen Shot below.
Here are some items that you need to consider while working on this assignment:
Scanner
printf
Naming constants (e.g., public static final int NUM = 2);
NumberFormat
String
How much money you want to add to your account? $1999.99 Amount to depoist: $20 First amount to withdraw: $100 Second amount to withdraw: $200 k********************* Account Information ****** Profile: ICity Full Name TAddress IState IZipcode ISSN 12 nicollect ave JOHN SMITH Mpls Mn 22123 123-32-2312 ************** ******* Account Summary: $1,999.99 $100.00 $200.00 $20.00 Initial Balance: First Withdrawal: Second Withdrawal: Deposit: Current balance: $1,719.99 ************* ********** Bills count: $100 Bills: $20 Bills: $10 Bills: $5 Bills: $1 Bills: 17 4
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