-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuestions.java
79 lines (70 loc) · 1.63 KB
/
Questions.java
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
public class Questions
/*
* By: Evan NG
* IC4UO-D1
* 323058826
*/
{
public Questions(String questions, String possibleA, String possibleB, String possibleC,String possibleD,String possibleE,
char answers, int diff )
/*
* This constructor is used to assign the questions, options, answers, and difficulties of each question to one of the instance varibles.
*/
{
question= questions;
optionA = possibleA;
optionB= possibleB;
optionC=possibleC;
optionD= possibleD;
optionE = possibleE;
answer = answers;
difficulty= diff;
}
public Questions(){}
public String getQuestion()
/*
* The methods below are all methods that return the data stored in each instance varible.
*/
{
return question;
}
public String getOptionA()
{
return optionA;
}
public String getOptionB()
{
return optionB;
}
public String getOptionC()
{
return optionC;
}
public String getOptionD()
{
return optionD;
}
public String getOptionE()
{
return optionE;
}
public int getDifficulty()
{
return difficulty;
}
public char getAnswer()
{
return answer;
}
/*
* The code below are my instance varibles.
*/
private String question;
private String optionA;
private String optionB;
private String optionC;
private String optionD;
private String optionE;
private char answer;
private int difficulty;
}