我有一个班级中每个学生的一系列考试成绩。例如,对于 Adam test1=90 test2=92 test3=93,平均值为91.67。然后我会将其另存为. 然后使用该数组,我将取其中的30%加上最终 ( ) 的70%来制作新数组。Array6
array5
courseaverage
我试图在下面的代码中实现这一点,但它不能正常工作。有没有人可以提出问题...
public class Proj5 {
public static void main (String[] args) {
String[] Array1 = {new String ("Adam"),new String ("Smith"),new String ("Jones"),new String ("Becky"),new String ("Taylor")};
Integer[] Array2 = {new Integer(90),new Integer(89),new Integer(86),new Integer(76),new Integer(95)};
Integer[] Array3 = {new Integer(92),new Integer(79),new Integer(85),new Integer(90),new Integer(87)};
Integer[] Array4 = {new Integer(93),new Integer(80),new Integer(90),new Integer(87),new Integer(92)};
Integer[] Array5 = {new Integer(90),new Integer(77),new Integer(86),new Integer(92),new Integer(89)};
System.out.println("Name Test1 Test2 Test3 Final Average Grade");
for (int column = 0; column<Array1.length; column++){
System.out.printf("%s ", Array1[column]);
System.out.printf("%s ", Array2[column]);
System.out.printf("%s ", Array3[column]);
System.out.printf("%s ", Array4[column]);
System.out.printf("%s ", Array5[column]);
System.out.println(); //start new line of output
}
}
}