-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRainforest.java
More file actions
40 lines (33 loc) · 1.46 KB
/
Copy pathRainforest.java
File metadata and controls
40 lines (33 loc) · 1.46 KB
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
import java.util.ArrayList;
public class Rainforest extends Environment {
/* This class depicts a tropical rainforest
* as found in West and Central Africa,
*
*/
private static final String environmentName = "Tropical Rainforest";
private static final double avgTemp = 25; //in degree Celsius
private static final double rainfall = 2150; //in millimeters
private ArrayList<Question> questionBank;
public Rainforest() {
super(environmentName, avgTemp, rainfall);
questionBank=new ArrayList<>();
loadQuestions("TemperateQuestions.csv");
questionBank.add(q0);
questionBank.add(q1);
questionBank.add(q2);
questionBank.add(q3);
loadQuestions("RainforestQuestions.csv");
}
public Question getQuestion(int index){
return questionBank.get(index);
}
//Questions Backup
final Question q0 = new Question("Which of these is essential for desert restoration",
"Trains","Cars","Camels","C","A");
final Question q1 = new Question("Which of these is essential for desert restoration",
"Trains","Cars","Camels","C","A");
final Question q2 = new Question("Which of these is essential for desert restoration",
"Trains","Cars","Camels","C","A");
final Question q3 = new Question("Which of these is essential for desert restoration",
"Trains","Cars","Camels","C","A");
}