Advertisement
Guest User

aeroport bug nom 2

a guest
Nov 28th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. Dans ---> VueConsole
  2.  
  3.  
  4.  
  5.  
  6.  
  7.     private void afficheCreationAeroport() {
  8.         int y;
  9.         int x;
  10.        
  11.  
  12.         System.out.println("----------------------------------------------");
  13.         System.out.println("Nom aéroport :");
  14.         String nom = new Scanner(System.in).nextLine();
  15.  
  16.         nom = nom.trim();
  17.        
  18.         switch (nom) {
  19.             case "":
  20.                 System.err.println("Nom aéroport --> null");
  21.                 this.afficheMenuChoixGeneral();
  22.             default:
  23.  
  24.         }
  25.  
  26.         do {
  27.             System.out.println("Position X :");
  28.             x = new Scanner(System.in).nextInt();
  29.         } while (x < 0 || x > 5000);
  30.         do {
  31.             System.out.println("Position Y :");
  32.             y = new Scanner(System.in).nextInt();
  33.         } while (y < 0 || y > 5000);
  34.  
  35.         Controller.getInstance().lancementScenario(new Declencheur(Declencheur.CREATION_AEROPORT, (new Aeroport(x, y, nom))));
  36.  
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement