public class Match extends Question
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<java.lang.String> |
answers
Provides ArrayList of Strings that represent answers section of matching portion
|
private java.util.ArrayList<java.lang.Integer> |
correctOrder
Provides ArrayList of Strings that provides the correct order of matching
|
private java.util.ArrayList<java.lang.String> |
questions
Provides ArrayList of Strings that represent question section of matching portion
|
Constructor and Description |
---|
Match()
The constructor of the Matching class
|
Modifier and Type | Method and Description |
---|---|
void |
addPair(java.lang.String question,
java.lang.String answer)
Adds a pair of question and answer to the question bank
|
java.lang.String |
getAnswer(int ndx)
Gets the answer for the question provided by ndx number
|
java.util.ArrayList<java.lang.String> |
getAnswers()
Gets the ArrayList of answers in the matching questions and answers array.
|
java.util.ArrayList<java.lang.String> |
getQuestions()
Gets the ArrayList of questions in the matching questions and answers array.
|
void |
removePair(int ndx)
Deletes the pair from the question bank
|
void |
scramble()
Randomizes the order in which the questions and answers appears
|
getCourse, getDiagramPath, getDifficulty, getKeyword, getQuestionText, getTime, setCourse, setDiagramPath, setDifficulty, setKeyword, setQuestionText, setTime
private java.util.ArrayList<java.lang.String> questions
private java.util.ArrayList<java.lang.String> answers
private java.util.ArrayList<java.lang.Integer> correctOrder
public void scramble()
public void addPair(java.lang.String question, java.lang.String answer)
question
- The String provided by Instructor to be the questionanswer
- The String provided by Instructor to be the matching answerpublic void removePair(int ndx)
ndx
- The index of the pairpublic java.util.ArrayList<java.lang.String> getQuestions()
public java.util.ArrayList<java.lang.String> getAnswers()
public java.lang.String getAnswer(int ndx)