-
Notifications
You must be signed in to change notification settings - Fork 0
/
RateSaveSurvey.java
87 lines (77 loc) · 3.03 KB
/
RateSaveSurvey.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
80
81
82
83
84
85
86
package RateMyClass;
import java.awt.*;
import java.util.ArrayList;
public class RateSaveSurvey {
public static int[][] survey = new int[6][40];
public static int[] surveyOne = new int[40];
public static int[] surveyTwo = new int[40];
public static int[] surveyThree = new int[40];
public static int[] surveyFour = new int[40];
public static int[] surveyFive = new int[40];
public RateSaveSurvey() {
survey[0] = surveyOne;
survey[1] = surveyTwo;
survey[2] = surveyThree;
survey[3] = surveyFour;
survey[4] = surveyFive;
}
public static int findNumber(String course, int currentQuestion) {
String newCourse = course.toLowerCase();
if (RateDriver.levelText.equals("math")) {
for (int i = 0; i < RateSurvey.math.length-1;i++) {
if (newCourse.equals(RateSurvey.math[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("science")) {
for (int i = 0; i < RateSurvey.science.length-1;i++) {
if (newCourse.equals(RateSurvey.science[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("english")) {
for (int i = 0; i < RateSurvey.english.length-1;i++) {
if (newCourse.equals(RateSurvey.english[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("social studies")) {
for (int i = 0; i < RateSurvey.social.length-1;i++) {
if (newCourse.equals(RateSurvey.social[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("art")) {
for (int i = 0; i < RateSurvey.art.length-1;i++) {
if (newCourse.equals(RateSurvey.art[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("pe")) {
for (int i = 0; i < RateSurvey.pe.length-1;i++) {
if (newCourse.equals(RateSurvey.pe[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("chinese")) {
for (int i = 0; i < RateSurvey.chinese.length-1;i++) {
if (newCourse.equals(RateSurvey.chinese[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("japanese")) {
for (int i = 0; i < RateSurvey.japanese.length-1;i++) {
if (newCourse.equals(RateSurvey.japanese[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("french")) {
for (int i = 0; i < RateSurvey.french.length-1;i++) {
if (newCourse.equals(RateSurvey.french[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("spanish")) {
for (int i = 0; i < RateSurvey.spanish.length-1;i++) {
if (newCourse.equals(RateSurvey.spanish[i])) return survey[currentQuestion][i];
}
}
else if (RateDriver.levelText.equals("hawaiian")) {
for (int i = 0; i < RateSurvey.hawaiian.length-1;i++) {
if (newCourse.equals(RateSurvey.hawaiian[i])) return survey[currentQuestion][i];
}
}
return 100;
}
}