-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScoreCalculator.java
57 lines (45 loc) · 908 Bytes
/
ScoreCalculator.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
package rebuilt;
import java.util.ArrayList;
public class ScoreCalculator
{
private int testType;
private int totalNumber;
private double MCscaler;
private ArrayList<Student> students;
public ScoreCalculator(ArrayList<Student> studentList, int type, int totNumber)
{
students = studentList;
testType = type;
totalNumber = totNumber;
}
public void calculate()
{
switch(testType)
{
case 0:
MCscaler = 50.0 / totalNumber;
break;
case 1:
MCscaler = 25.0 / totalNumber;
break;
case 2:
MCscaler = 15.0 / totalNumber;
break;
}
for(Student s : students)
{
s.computeScaledMC(MCscaler);
s.computeScaledFR(testType);
s.computeUncurvedPercentages();
s.computeCurvedPercentages(testType);
}
}
public ArrayList<Student> getStudentList()
{
return students;
}
public double getMCScaler()
{
return MCscaler;
}
}