Question: Please do not use break, continue / exit , return Please do not use loops Documentation: See your course syllabus addendum file in Canvas for

Please do not use break, continue/exit, return
Please do not use loops
Documentation: See your course syllabus addendum file in Canvas for the required heading documentation and other notes. Make sure you have the header section properly created using tags
such as @author, @file, etc
Write a java program for the question below, Save the file with the following format
LastNameFirstNameCit130Hw3.java
Deliverable: Submit your Java file. Use the file format: LastNameFirstNameCit130Hw3.java for
your file name. NOTE: Java class names must begin with a capital letter (i.e.,FooBarCIT130HW#.java) Submit your file to the assignment dropbox in Canvas
Assignment:
Create a java program for a simple banking system that allows users to perform basic banking actions: depositing money, withdrawing money, checking their balance, and exiting the system. Follow these steps to structure your program.
1
- Declaring Variables:
The program needs a variable to keep track of the user's balance, initialized at $100.00.
It should also have a variable to store the amount for deposits or withdrawals.
Another variable will store the user's menu option.
2
- Set Up User Input:
The program needs to be able to take user input for selecting menu options and for entering deposit or withdrawal amounts, create a Scanner
3
- Displaying the Menu:
The program will display a menu with four options:
1: Deposit Money
2: Withdraw Money
3: Check Balance
4: Exit
4
- The user will choose one of the options from the menu. Based on their choice, the program will perform different actions:
5
- If Option 1(Deposit Money) is selected :
The user will be asked to enter an amount to deposit.
If the amount is valid (positive means greater than zero), then the amount will be added to the current balance.(current balance is $100.00). Please see sample run 1.
If the amount is invalid (negative or zero), the program should display an error message.
6
- If Option 2(Withdraw Money) is selected:
The user will be asked to enter an amount to withdraw. The program should check if the amount is valid (positive) and && the amount is valid and within the available balance (means amount less than the balance).
It will be deducted(subtract) from the balance.
If the amount exceeds (more than the balance) the balance or is invalid, an error message should be displayed. Please see sample run 2,3 and 4.
7
- If Option 3(Check Balance) is selected:
The program should simply display the current balance to the user. Please see sample run 5.
Done with if, else if
8
- If option 4(Exiting the Program) is selected:
If the user selects the exit option 4, a message to thank the user will be displayed and the program should terminate. Please see sample run 6.
Notes:
Feel free to change the balance amount.
Thanking the user message will display with any option the user will select.
Dont worry about $ symbol.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!