Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.0 kB
0
Indexable
Never
package pt.ulisboa.tecnico.socialsoftware.tutor.teacherdashboard.dto;

import pt.ulisboa.tecnico.socialsoftware.tutor.teacherdashboard.domain.QuestionStats;

public class QuestionStatsDto {
    private Integer id = 0;
    private Integer numAvailable = 0, answeredQuestionsUnique = 0;
    private Float averageQuestionsAnswered = 0.0f;

    public QuestionStatsDto() {
    }

    public QuestionStatsDto(QuestionStats questionStats) {
        this.id = questionStats.getId();
        this.numAvailable = questionStats.getNumAvailable();
        this.answeredQuestionsUnique = questionStats.getAnsweredQuestionsUnique();
        this.averageQuestionsAnswered = questionStats.getAverageQuestionsAnswered();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNumAvailable() {
        return numAvailable;
    }

    public void setNumAvailable(Integer numAvailable) {
        this.numAvailable = numAvailable;
    }

    public Integer getAnsweredQuestionsUnique() {
        return answeredQuestionsUnique;
    }

    public void setAnsweredQuestionsUnique(Integer answeredQuestionsUnique) {
        this.answeredQuestionsUnique = answeredQuestionsUnique;
    }

    public float getAverageQuestionsAnswered() {
        return averageQuestionsAnswered;
    }

    public void setAverageQuestionsAnswered(float averageQuestionsAnswered) {
        this.averageQuestionsAnswered = averageQuestionsAnswered;
    }


    @Override
    public String toString() {
        return "QuestionStatsDto{" +
                "id=" + id +
                ", numberOfStudentsAvailable=" + this.getNumAvailable() +
                ", numberOfUniqueQuestionsAnswered=" + this.getAnsweredQuestionsUnique() +
                ", numberOfAverageQuestionsAnswered=" + this.getAverageQuestionsAnswered() +
                "}";
    }
}