Professional Documents
Culture Documents
ATM ppt2
ATM ppt2
ATM ppt2
(ATM)
TEAM MEMBERS:
A.VARUN KUMAR(23EG505R03)
CH.HRUSHIKESH(23EG505R10)
N.HARSHITH(23EG505R29)
S.TEJESH KUMAR(23EG505R36)
A.JASHWANTH(23EG505R46)
Abstract
This presentation introduces a Java program that simulates the basic functions
of an ATM (Automated Teller Machine). Users can check their balance,
withdraw funds, deposit funds, and exit the system. We'll explore how the
program works, step-by-step, with code examples .
We'll discuss key programming concept like java.util package, showing how
they make the program easier to understand and use. The presentation
includes a live demonstration of the program running in a Java environment, so
you can see it in action.
while(true) {
System.out.println("1. Check Balance");
System.out.println("2. Withdraw");
System.out.println("3. Deposit");
System.out.println("4. Exit");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
switch(choice) {
case 1:
System.out.println("Your balance is: $" + balance);
break;
case 2:
System.out.print("Enter amount to withdraw: ");
double withdrawAmount = scanner.nextDouble();
if(withdrawAmount > balance) {
System.out.println("Insufficient balance!");
} else {
balance -= withdrawAmount;
System.out.println("Withdrawal successful. Remaining
balance: $" + balance);
}
break;
case 3:
System.out.print("Enter amount to deposit: ");
double depositAmount = scanner.nextDouble();
balance += depositAmount;
System.out.println("Deposit successful. New balance: $" +
balance);
break;
case 4:
System.out.println("Exiting... Thank you!");
return;
default:
System.out.println("Invalid choice!");
}
}
}
}
OUTPUTS:
THANK YOU