Sample Input/Output: Depicted below are sample outputs when the program is executed (the items in bold characters are input from the user, while the items in bold italic are calculated and printed by the program): -ATM- -ATM-- 1. Withdraw 2. Deposit 1. Withdraw 2. Deposit 3. Transfer 3. Transfer 4. Check Balance 4. Check Balance 5. EXIT 5. EXIT Choose operation: 1 Choose operation: 1 Enter amount to be withdrawn: 1000 Enter amount to be withdrawn: 6000 Collect your money Check Balance? (Y/N): Y Insufficient Balance Check Balance? (Y/N): Y Balance: 4000 Balance: 4500 -ATM-- -ATM----- 1. Withdraw 2. Deposit 1. Withdraw 2. Deposit 3. Transfer 3. Transfer 4. Check Balance 4. Check Balance 5. EXIT Choose operation: 3 5. EXIT Choose operation: 2 Enter amount you want to deposit: 500 Check Balance? (Y/N): N Enter Account Number:0566323454 Enter Transfer Amount: 300 Check Balance? (Y/N): Y Balance: 3200 *Note: The initial balance is 0. The user is given an option to check the balance or not. The program will run until the exit option is chosen. Required: The flowchart, the .java file (FamilyName_ATM.java) containing the code and 4 (or more) image files (Sample1, Sample2, Sample3, and Sample4) containing different sample input/output of the program.
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
![Instruction:
Create a flowchart and a java program of the problem stated as follows. Create
user-defined methods that will perform 4 functionalities of an Automated Teller
Machine (Withdraw, Deposit, Transfer, Balance Check)
1. Withdraw (method name: withdraw)
* Input the amount to be withdrawn. Compute for the remaining balance after
the operation (balance = balance - withdrawn)
2. Deposit (method name: deposit)
* Input the amount to be deposited. Compute for the updated balance after
the operation (balance = balance + deposit)
3. Transfer (method name: transfer)
*Input the acCount number and the amount to be transferred. Compute for the
updated balance after the operation (balance = balance - moneySent)
4. Balance Check (method name: balanceCheck)
* Display the remaining balance.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb1a49c49-ab7f-4db3-b55f-5689ec448f86%2F15495e53-7036-46ad-86b7-6687355b87d2%2Ftrs5xoo_processed.png&w=3840&q=75)
![Sample Input/Output:
Depicted below are sample outputs when the program is executed (the items in bold
characters are input from the user, while the items in bold italic are calculated and
printed by the program):
--ATM-
-ATM---------
1. Withdraw
2. Deposit
1. Withdraw
2. Deposit
3. Transfer
4. Check Balance
5. EXIT
Choose operation: 1
3. Transfer
4. Check Balance
5. EXIT
Choose operation: 1
Enter amount to be withdrawn: 1000
Enter amount to be withdrawn: 6000
Collect your money
Check Balance? (Y/N): Y
Insufficient Balance
Check Balance? (Y/N): Y
Balance: 4000
Balance: 4500
--ATM-
--ATM--
1. Withdraw
2. Deposit
3. Transfer
1. Withdraw
2. Deposit
3. Transfer
4. Check Balance
4. Check Balance
5. EXIT
Choose operation: 2
Enter amount you want to deposit: 500
Check Balance? (Y/N): N
5. EXIT
Choose operation: 3
Enter Account Number:0566323454
Enter Transfer Amount: 300
Check Balance? (Y/N): Y
Balance: 3200
*Note: The initial balance is 0. The user is given an option to check the balance or not.
The program will run until the exit option is chosen.
Required: The flowchart, the .java file (FamilyName_ATM.java) containing the code and
4 (or more) image files (Samplel, Sample2, Sample3, and Sample4) containing different
sample input/output of the program.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb1a49c49-ab7f-4db3-b55f-5689ec448f86%2F15495e53-7036-46ad-86b7-6687355b87d2%2Fe7cqx7_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)