Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import java.util.Scanner;
  2. public class IntMain
  3. {
  4. public static int main(String args[])
  5. {
  6. Scanner scan=new Scanner(System.in);
  7. int menu;
  8. int temp=1;
  9. QueueMachine ticket=new QueueMachine();
  10. while(true)
  11. {
  12. System.out.println("PILIHAN LAYANAN:");
  13. System.out.println("1. Ambil Nomor Antrian");
  14. System.out.println("2. Exit\n");
  15. System.out.println("Pilihan Anda: ");
  16. menu=scan.nextInt();
  17. switch(menu)
  18. {
  19. case 1:
  20. System.out.println("\n");
  21. if (temp==1){
  22. ticket.printLoketA();
  23. temp++;}
  24. else {
  25. ticket.printLoketB();
  26. temp--;}
  27. break;
  28.  
  29. case 2:
  30. return 0;
  31. }
  32. }
  33. }
  34. }