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.
Step by step
Solved in 4 steps with 1 images