package j2.lesson02_2;
public class ExamRecord3Action {
public static void main(String[] args) {
ExamRecord3[] rec = new ExamRecord3[4];
rec[0] = new ExamRecord3("Taro", 1001, 50, 90, 100, 40, 90);
rec[1] = new ExamRecord3("Hanako", 1002, 70, 30, 80, 100, 70);
rec[2] = new ExamRecord3("Kenji", 1003, 60, 50, 70, 60, 80);
rec[3] = new ExamRecord3("Aya", 1004, 40, 100, 90, 50, 55);
System.out.println("===3科目の成績===");
for(int i=0; i<rec.length; i++){
rec[i].show3();
}
System.out.println("===5科目の合計===");
for(int i=0; i<rec.length; i++){
System.out.println(rec[i].name + ", Total5=" + rec[i].getTotal5());
}
}
}
|