This is your final project — bring together everything you've learned! Build a program that simulates a bank account with deposits, withdrawals, and a balance check.
YOUR TASK
Create a program that:
Starts with a balance of 0
Shows a menu: 1. Deposit2. Withdraw3. Balance4. Exit
Loops until the user selects 4
Prevents withdrawing more than the balance
Prints Balance: X when checking balance or after operations
Need a hint?
Step-by-step:
1. Declare double balance = 0;
2. Use a while (true) loop
3. Print the menu inside the loop
4. Read choice with sc.nextInt()
5. Use switch:
• case 1: add amount to balance
• case 2: check amount <= balance before subtracting
• case 3: print balance
• case 4: System.exit(0);
6. Print "Balance: " + balance after deposit/withdraw
Console initialized...
Ready for Final Project: Bank Account Simulator
> This is the big one — bring it all together!
> Use "Check My Code" to validate, then complete the course!