-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTest.java
More file actions
43 lines (38 loc) · 890 Bytes
/
Test.java
File metadata and controls
43 lines (38 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import java.util.ArrayList;
/**
* @author JavaDoc
* Represents a module test.
*/
public class Test {
private String name;
private ArrayList<Question> questions;
/**
* Constructor to initialize a test.
* @param name String of test name.
*/
public Test(String name){
this.name = name;
this.questions = new ArrayList<Question>();
}
/**
* Returns the test name.
* @return String of test name.
*/
public String getName(){
return name;
}
/**
* Returns the questions of test.
* @return ArrayList<Question> of questions.
*/
public ArrayList<Question> getQuestions(){
return questions;
}
/**
* Add questions to questions list.
* @param question Type Question.
*/
public void addQuestion(Question question){
questions.add(question);
}
}