Package metier

Examples of metier.Question


        scores = new ArrayList<Float>();
        this.webApi = new WebApi();
    }
   
    public Question getQuestion1() {
        Question question = new Question(1);
        question.setIntitule("Placer les saisons");
        question.setExplaination("Explanations?");

        //Cases
        Element e1 = new Element();
        e1.setLibelle("Feu");
        e1.setUrl_image("/ressources/Feu");
        e1.setID(1);
        question.addFixedElement(e1);
   
        Element e2 = new Element();
        e2.setLibelle("Eau");
        e2.setUrl_image("/ressources/Eau");
        e2.setID(2);
        question.addFixedElement(e2);
   
        Element e3 = new Element();
        e3.setLibelle("Terre");
        e3.setUrl_image("/ressources/Terre");
        e3.setID(3);
        question.addFixedElement(e3);
   
        Element e4 = new Element();
        e4.setLibelle("Eau");
        e4.setUrl_image("/ressources/M�tal");
        e4.setID(4);
        question.addFixedElement(e4);
   
        Element e5 = new Element();
        e5.setLibelle("Bois");
        e5.setUrl_image("/ressources/Bois");
        e5.setID(5);
        question.addFixedElement(e5);
   
  //Mots � placer
  Element e6 = new Element();
        e6.setLibelle("Rate");
        e6.setUrl_image("/ressources/Rate");
  question.addMovableElement(1, e6);
   
  Element e7 = new Element();
        e7.setLibelle("Poumon");
        e7.setUrl_image("/ressources/Poumon");
  question.addMovableElement(2, e7);
   
  Element e8 = new Element();
        e8.setLibelle("Reins");
        e8.setUrl_image("/ressources/Rein");
  question.addMovableElement(3, e8);
   
  Element e9 = new Element();
        e9.setLibelle("Coeur");
        e9.setUrl_image("/ressources/Coeur");
  question.addMovableElement(4, e9);
   
        return question;
    }
View Full Code Here


    /**
     *  This function goal is to simply fetch the json data from <em>JSonURL</em> and deserialize them.
     * @return Question[] an array containing the objects fetched and mapped to the domain class Question
     */
    public Question[] getQuestions(){
        Question questions[] = null;
        try{
            // create a client and then a web resource
            Client client = Client.create();
            WebResource webResource = client.resource(JSonURL);
            // create a response object with the specified accepted Media-Type
View Full Code Here

    try{
      reader.beginArray();
     
        while(reader.hasNext())
         {
            Question q = gson.fromJson(reader, Question.class);
            questionsResult.add(q);
         }
    }
    finally{
         reader.endArray();
View Full Code Here

        System.out.println("Launch Timer");
        firstTimerLaunch = false;
        currentTime = kDefaultTimerTimeInSeconds;
        reminder(1000);
       
        Question q1 = frame.getQuestion1();
    }
View Full Code Here

        initComponents();
        this.setResizable(false);
        setContentPane(new Connexion(this));    
        this.setVisible(true);
       
        Question q1 = getQuestion1();
    }
View Full Code Here

       
        Question q1 = getQuestion1();
    }
   
    public Question getQuestion1(){
        Question question = new Question(1);
        question.setIntitule("Placer les saisons");
        question.setExplaination("Explanations?");

  //Cases
        Element e1 = new Element();
        e1.setLibelle("Feu");
        e1.setUrl_image("/ressources/Element_Feu.png");
        e1.setID(1);
        question.addFixedElement(e1);
   
        Element e2 = new Element();
        e2.setLibelle("Eau");
        e2.setUrl_image("/ressources/Element_Eau.png");
        e2.setID(2);
        question.addFixedElement(e2);
   
        Element e3 = new Element();
        e3.setLibelle("Terre");
        e3.setUrl_image("/ressources/Element_Terre.png");
        e3.setID(3);
        question.addFixedElement(e3);
   
        Element e4 = new Element();
        e4.setLibelle("Eau");
        e4.setUrl_image("/ressources/Element_Metal.png");
        e4.setID(4);
        question.addFixedElement(e4);
   
        Element e5 = new Element();
        e5.setLibelle("Bois");
        e5.setUrl_image("/ressources/Element_Bois.png");
        e5.setID(5);
        question.addFixedElement(e5);
   
  //Mots à placer
  Element e6 = new Element();
        e6.setLibelle("Rate");
        e6.setUrl_image("/ressources/rate.png");
  question.addMovableElement(1, e6);
   
  Element e7 = new Element();
        e7.setLibelle("Poumon");
        e7.setUrl_image("/ressources/poumon.png");
  question.addMovableElement(2, e7);
   
  Element e8 = new Element();
        e8.setLibelle("Reins");
        e7.setUrl_image("/ressources/reins.png");
  question.addMovableElement(3, e8);
   
  Element e9 = new Element();
        e9.setLibelle("Coeur");
        e7.setUrl_image("/ressources/coeur.png");
  question.addMovableElement(5, e9);
   
        return question;
    }
View Full Code Here

TOP

Related Classes of metier.Question

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.