Class Survey

  • All Implemented Interfaces:
    java.io.Serializable

    public class Survey
    extends Challenge
    A survey is very similar to a challenge with only one minor difference in that the instruction is really a question and it contains answers for that question for the user to respond too. The idea is to collect data rather than to edit data.
    See Also:
    Serialized Form
    • Constructor Detail

      • Survey

        public Survey​(java.lang.String name,
                      java.lang.String description,
                      java.lang.String blurb,
                      java.lang.String instruction,
                      ChallengeDifficulty difficulty,
                      java.util.List<java.lang.String> answers,
                      java.lang.String tags,
                      boolean enabled)
    • Method Detail

      • fromResource

        public static Challenge fromResource​(java.lang.String checkName)
        Creates a Challenge based on a JSON resource file
        Parameters:
        checkName - The name of the check that will look for the json challenge info
        Returns:
        The challenge based from the resource json file
      • getAnswers

        public java.util.List<java.lang.String> getAnswers()
      • toJson

        public com.google.gson.JsonObject toJson​(java.lang.String challengeName)
        Overrides:
        toJson in class Challenge