Package nz.ac.massey.cs.deploymentpuzzlersurvey

Examples of nz.ac.massey.cs.deploymentpuzzlersurvey.Responses


* @author jens dietrich
*/
public class FindDuplicatedRespondentIds {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().filter(ResponseFilter.ALL);
    Map<String,Response> map = new HashMap<>();
    int c = 0;
    for (Response response:responses) {
      String id = response.getRespondentID();
      Response response2 = map.put(id,response);
View Full Code Here


import nz.ac.massey.cs.deploymentpuzzlersurvey.TechnicalQuestion;
import nz.ac.massey.cs.deploymentpuzzlersurvey.TechnicalQuestions;

public class CorrectnessCalculator {
  public static double calculateCorrectness (ResponseFilter responseFilter,QuestionFilter questionFilter ) throws Exception {
    Responses responses = Responses.build().filter(responseFilter);
   
    int answered = 0;
    int anwseredCorrectly = 0;
   
    for (TechnicalQuestion q:TechnicalQuestions.QUESTIONS) {
     
      if (questionFilter.accept(q)) {
        String id = q.getId();       
        answered = answered + responses.answered(id).notDuplicated(id).size();
        anwseredCorrectly = anwseredCorrectly + responses.answered(id).notDuplicated(id).answeredCorrectly(id).size();
      }
    }
   
    return ((double)anwseredCorrectly)/((double)answered);
  }
View Full Code Here

   
    return ((double)anwseredCorrectly)/((double)answered);
  }
 
  public static int countResponses (ResponseFilter responseFilter,QuestionFilter questionFilter ) throws Exception {
    Responses responses = Responses.build().filter(responseFilter);
   
    int answered = 0;
   
    for (TechnicalQuestion q:TechnicalQuestions.QUESTIONS) {
     
      if (questionFilter.accept(q)) {
        String id = q.getId();       
        answered = answered + responses.answered(id).notDuplicated(id).size();
      }
    }
   
    return answered;
  }
View Full Code Here

* @author jens dietrich
*/
public class PrintLevelOfExperience {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().didNotAnswerBoth();
    Map<Object,Integer> map = new LinkedHashMap<>();
    int notAnswered = 0;
    for (LevelOfExperience k:LevelOfExperience.values()) {
      map.put(k,0);
    }
View Full Code Here

* @author jens dietrich
*/
public class PrintFrameworkDesignExperience {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().didNotAnswerBoth();
    Map<Object,Integer> map = new LinkedHashMap<>();
    int notAnswered = 0;
    for (FrameworkDesignExperience k:FrameworkDesignExperience.values()) {
      map.put(k,0);
    }
View Full Code Here

import nz.ac.massey.cs.deploymentpuzzlersurvey.TechnicalQuestions;

public class CSVExporter {
  public static final String SEP = ",";
  public static void exportResults (ResponseFilter responseFilter,QuestionFilter questionFilter ) throws Exception {
    Responses responses = Responses.build().filter(responseFilter);
   
    System.out.println("id,category,type,in short surv,answ (s),corr answ (s),answ (f),corr answ(f),answers,corr answe");
   
    for (TechnicalQuestion q:TechnicalQuestions.QUESTIONS) {
     
      if (questionFilter.accept(q)) {
     
        String id = q.getId();
        System.out.print(id);
        System.out.print(SEP);
        System.out.print(q.getCategory());
        System.out.print(SEP);
        System.out.print(q.getType());
        System.out.print(SEP);
        System.out.print(q.isInShortSurvey());
        System.out.print(SEP);
       
        responses.from(Survey.SHORT).answered(id).notDuplicated(id).printSize();
        System.out.print(SEP);
       
        responses.from(Survey.SHORT).answered(id).notDuplicated(id).answeredCorrectly(id).printSize();
        System.out.print(SEP);
       
        responses.from(Survey.FULL).answered(id).notDuplicated(id).printSize();
        System.out.print(SEP);
       
        responses.from(Survey.FULL).answered(id).notDuplicated(id).answeredCorrectly(id).printSize();
        System.out.print(SEP);
       
        responses.answered(id).printSize();
        System.out.print(SEP);
       
        responses.answered(id).notDuplicated(id).answeredCorrectly(id).printSize();
        System.out.println();
      }
    }
  }
View Full Code Here

* @author jens dietrich
*/
public class PrintOccupation {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().didNotAnswerBoth();
    Map<Object,Integer> map = new LinkedHashMap<>();
    int notAnswered = 0;
    for (Occupation k:Occupation.values()) {
      map.put(k,0);
    }
View Full Code Here

* @author jens dietrich
*/
public class PrintCorrectAnswerRatioDependingOnTechnologyLatex {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().didNotAnswerBoth();
   
    // pattern:
    // *1 if respondent selected technology
    // *2 if respondent did not selected technology, but answered question
    Map<Object,Integer> correctAnswersRECP1 = new LinkedHashMap<>();
View Full Code Here

* @author jens dietrich
*/
public class PrintCorrectAnswerRatioDependingOnLevelOfExperience {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().didNotAnswerBoth();
    Map<Object,Integer> correctAnswersRECP = new LinkedHashMap<>();
    Map<Object,Integer> allAnswersRECP = new LinkedHashMap<>();
    Map<Object,Integer> correctAnswersUPGR = new LinkedHashMap<>();
    Map<Object,Integer> allAnswersUPGR = new LinkedHashMap<>();
    Map<Object,Integer> correctAnswersINL = new LinkedHashMap<>();
View Full Code Here

* @author jens dietrich
*/
public class PrintYearsOfExperience {

  public static void main(String[] args) throws Exception {
    Responses responses = Responses.build().didNotAnswerBoth();
    Map<Object,Integer> map = new LinkedHashMap<>();
    int notAnswered = 0;
    for (YearsOfExperience k:YearsOfExperience.values()) {
      map.put(k,0);
    }
View Full Code Here

TOP

Related Classes of nz.ac.massey.cs.deploymentpuzzlersurvey.Responses

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.