Example #1
1
	public Question questionAfter(Question current){
		int curr = allQuestions.indexOf(current);
		if(curr != allQuestions.length() - 1){
			return allQuestions.get(curr + 1);
		}
		//error result -- should never happen if we only call this after isLastQuestion gives the okay
		else return current;
	}
Example #2
1
	public Boolean isLastQuestion(Question current){
		int curr = allQuestions.indexOf(current);
		return curr == allQuestions.length();
	}