Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. package adammia.example.com.mdquiz;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. /**
  6. * Created by adammia on 2017. 03. 21.
  7. */
  8.  
  9. public class MultiAnswerQuestion extends Question {
  10. ArrayList<String> choices;
  11.  
  12. /**
  13. * @param questionText is text that explains question
  14. * @param answer must be numbers in form of string like if number 2 and number 5 are correct answers string must be: "25";
  15. * @param userChoices is text that is displayed inside checkboxes
  16. */
  17. public MultiAnswerQuestion(String questionText, String answer, String... userChoices) {
  18. super(questionText, answer);
  19. choices = new ArrayList<String>();
  20. for (int i = 0; i < userChoices.length; i++) {
  21. choices.add(userChoices[i]);
  22. }
  23. }
  24.  
  25. public ArrayList getChoices() {
  26. return choices;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement