Closed victorjatoba closed 7 years ago
/***
* Search the question that have the average difficulty level.
*
* @return the average question
*/
public QuestionModel searchTheAverageQuestion() {
QuestionModel averageQuestion = null;
List<QuestionModel> sortedQuestions = Util.sortQuestionListFromEasierToHardest(DaoFake.getQuestions());
if (!ValidationUtil.isNullOrEmpty(sortedQuestions)) {
int averagePosition = sortedQuestions.size() / 2;
averageQuestion = sortedQuestions.get(averagePosition);
}
return averageQuestion;
}
If the system have no informatin about the responser, select a mean level question