Package metier.reservations

Examples of metier.reservations.AttributionPlaces


   *
   *
   * @return la liste de fauteuils attribués
   */
  private Collection getFauteuils(){
    AttributionPlaces ap = new AttributionPlaces();
    Collection fauteuilsAttribues = null;
    //System.out.println("[InfosAttribution] : nbPlacesRes = "+res.getNbPersonnes());
    try{
      fauteuilsAttribues = ap.proposeFauteuils(res.getIdZone(), rep.getIdSeance(), res.getNbPersonnes());
    }catch(NombreTotalPlacesInsuffisantException ntpie ){
      String message = "Il n'y a plus assez de places dans cette zone !";
    }
    return fauteuilsAttribues;
  }
View Full Code Here


      anciennesReservations.clear();
      anciennesReservations = fr.getAnciennesReservations(today);
      System.out.println("Nouvelle situation des anciennes reservations: "+anciennesReservations);
     
     
      ArrayList propose = (ArrayList)new AttributionPlaces().proposeFauteuils("balcon","4TR", 45);
     
      System.out.println("Places trouvees"+propose);
     
     
     
View Full Code Here

      System.out.println("\nTEST NO "+i
          +"\nBUT: Recherche de "+i
          +" places consecutives (parmi les "
          +z3.getNbFauteuils()+" places restantes)");
      try{
        System.out.println(new AttributionPlaces().getConsecutiveDsZone(z3, i));
      }catch(NombreTotalPlacesInsuffisantException e){
        e.printStackTrace();
      }
      System.out.println("\nRESULTAT: Zone z3 (reste "+z3.getNbFauteuils()+"): \n"+z3.toString());
    }
    try{
      System.out.println(new AttributionPlaces().getConsecutiveDsZone(z3, 2));
    }catch(NombreTotalPlacesInsuffisantException e){
      e.printStackTrace();
    }
    System.out.println("\nRESULTAT: Zone z3 (reste "+z3.getNbFauteuils()+"): \n"+z3.toString());
  }
View Full Code Here

    try{
      System.out.println("\n\nTEST PROPOSE PLACES\nZ3 (avec "+z3.getNbFauteuils()+" places restantes) au depart: "+ z3.toString());
     
      reInitZ3();
     
      proposition = (ArrayList)new AttributionPlaces().proposePlaces(z3, 64);
      System.out.println("TEST DECOUPAGE 1\n" +z3.toString()+"\n\nResultat:\n"+proposition.toString());
    }catch(NombreTotalPlacesInsuffisantException ntpie){
      ntpie.printStackTrace();
    }
    try{
//      reInitZ3();
      System.out.println("TEST DECOUPAGE");
      proposition = (ArrayList)new AttributionPlaces().proposePlaces(z, 15);
      System.out.println("TEST DECOUPAGE TERMINE:\n"+z.toString()+"\nResultat:\n"+proposition.toString());
     
    }catch(NombreTotalPlacesInsuffisantException ntpie){
      ntpie.printStackTrace();
    }
    try{
//      reInitZ3();
      System.out.println("TEST DECOUPAGE \n"+z.toString()+"\n\n");
      proposition = (ArrayList)new AttributionPlaces().proposePlaces(z, 16);
      System.out.println("Resultat:\n"+proposition.toString());
     
    }catch(NombreTotalPlacesInsuffisantException ntpie){
      ntpie.printStackTrace();
    }
View Full Code Here

  public void testProposeFauteuils(){
    try{
      reInitZ3();
      System.out.println(z3.toString());
      System.out.println("Test propose Fauteuils");
      ArrayList proposition = (ArrayList)new AttributionPlaces().proposeFauteuils(z3, 2);
      System.out.println("Resultat:\n"+proposition.toString());
      System.out.println("Situation apres\n"+z3.toString());
    }catch(Exception e){
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of metier.reservations.AttributionPlaces

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.