Skip to content

Instantly share code, notes, and snippets.

@silageman
Created January 27, 2016 16:01
Show Gist options
  • Save silageman/efa32026387358877efb to your computer and use it in GitHub Desktop.
Save silageman/efa32026387358877efb to your computer and use it in GitHub Desktop.
atm project file
import java.util.Scanner;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author lenovo
*/
public class atm {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int menuoption;
menuoption = displaymenu();
if(menuoption == 1){
System.out.println("you selected option 1");
displaybalance();
}
else if(menuoption == 2){
System.out.println("you selected option 2");
withdraw();
}
else if(menuoption == 3){
System.out.println("you selected option 3");
lodgefunds();
}
else if(menuoption == 4){
System.out.println("you selected option 4");
changepin();
}
else if(menuoption == 5){
System.out.println("you selected option 5");
ministatement();
}
}
public static int displaymenu(){
System.out.println("1: Print balance");
System.out.println("2: Withdraw money");
System.out.println("3: Lodge");
System.out.println("4: Change pin");
System.out.println("5: Mini statement");
Scanner scan = new Scanner(System.in);
int selection = scan.nextInt();
return selection;
}
public static void displaybalance(){
}
public static void withdraw(){
}
public static void lodgefunds(){
}
public static void changepin(){
}
public static void ministatement(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment