Ya no tienes que indagar más en otras páginas porque llegaste al sitio adecuado, tenemos la solución que quieres y sin complicaciones.
Ejemplo: atm java
importjava.util.Scanner;publicclass ATM privatestaticScanner in;privatestaticfloat balance =0;// For everyone they will get 0privatestaticint anotherTransaction;privatestaticvoidgreetings()System.out.println("Welcome to bank Pepe Pig you can withdraw, deposit, and balance you have $0");publicstaticvoidmain(String[] args)
in =newScanner(System.in);greetings();transaction();privatestaticvoidtransaction()int choice;System.out.println("1. Withdraw ");System.out.println("2. Deposit");System.out.println("3. Balance");System.out.println("---------------------"+"Please select an option: "+"---------------------");
choice = in.nextInt();switch(choice)privatestaticvoidanotherTransaction()System.out.println("Do you want another transaction? nnPress 1 for anotherTransaction n2 To exit.");
anotherTransaction = in.nextInt();if(anotherTransaction ==1)transaction();// Call methodelseif(anotherTransaction ==2)System.out.println("Thank you for banking in bank of leano!");elseSystem.out.println("Invalid choice nn");anotherTransaction();
Agradecemos que desees añadir valor a nuestro contenido cooperando tu experiencia en las ilustraciones.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)