Package nz.ac.massey.cs.deploymentpuzzlersurvey.answer

Examples of nz.ac.massey.cs.deploymentpuzzlersurvey.answer.YearsOfExperience


    int notAnswered = 0;
    for (YearsOfExperience k:YearsOfExperience.values()) {
      map.put(k,0);
    }
    for (Response r:responses) {
      YearsOfExperience k = r.getYearsOfExperience();
      if (k==null) {
        notAnswered = notAnswered+1;
      }
      else {
        int v = map.get(k);
View Full Code Here


      allAnswersINL.put(k,0);
      correctAnswersALL.put(k,0);
      allAnswers.put(k,0);
    }
    for (Response r:responses) {
      YearsOfExperience k = r.getYearsOfExperience();
      for (TechnicalQuestion q:TechnicalQuestions.QUESTIONS) {
        if (k!=null && r.hasAnswered(q.getId())) {
          boolean c = r.hasAnsweredCorrectly(q.getId());
          increase(allAnswers,k);
          if (c) {
            increase(correctAnswersALL,k);
          }
          if (q.getType() == Type.INLINING) {
            increase(allAnswersINL,k);
            if (c) {
              increase(correctAnswersINL,k);
            }
          }
          else if (q.getType() == Type.RECOMPILATION) {
            increase(allAnswersRECP,k);
            if (c) {
              increase(correctAnswersRECP,k);
            }
          }
          else if (q.getType() == Type.UPGRADE) {
            increase(allAnswersUPGR,k);
            if (c) {
              increase(correctAnswersUPGR,k);
            }
          }
        }
      }
     
    }
   
    System.out.println("correct answer ratio depending on years of experience");
    // use keys from any map, they are all the same
    System.out.println("key,corr. answers UPGR,all answers UPGR,corr. answers RECP,all answers RECP,corr. answers INL,all answers INL,corr. answers ALL,all answers");
    char SEP = ',';
    for (Entry<Object,Integer> e:correctAnswersRECP.entrySet()) {
      Object k = e.getKey();
      System.out.print(k.toString().toLowerCase().replace('_',' '));
      System.out.print(SEP);
     
      System.out.print(correctAnswersUPGR.get(k));
      System.out.print(SEP);
      System.out.print(allAnswersUPGR.get(k));
View Full Code Here

TOP

Related Classes of nz.ac.massey.cs.deploymentpuzzlersurvey.answer.YearsOfExperience

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.