G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 10th, 2020 125 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package it.itsvolta.corsojava.quiz;
  2.  
  3. import java.util.List;
  4.  
  5. public class QuizMain {
  6.  
  7.     public static void main(String[] args) throws QuizException {
  8.  
  9.         IQuizManager qm = new QuizManager();
  10.         IQuizzes quizzes = qm.load("quizzes.txt");
  11.         List<IQuiz> quiz = quizzes.getQuiz();
  12.  
  13.         IQuiz question1 = quiz.get(0);
  14.         List<Option> options1 = question1.getOptions();
  15.         System.out.println(question1.getQuestion());
  16.         for (Option element : options1) {
  17.             System.out.println(element.getText() + " " + element.isCorrect());
  18.         }
  19.        
  20.         IQuiz question2 = quiz.get(1);
  21.         List<Option> options2 = question2.getOptions();
  22.         System.out.println(question2.getQuestion());
  23.         for (Option element : options2) {
  24.             System.out.println(element.getText() + " " + element.isCorrect());
  25.         }
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top