package j2.lesson01_2;
import java.io.*;
public class ExamRecordAction1 {
public static void main(String[] args) throws IOException{
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
ExamRecord p;
p = new ExamRecord();
System.out.print("名前を入力: ");
p.name = reader.readLine();
System.out.print("数学の点数を入力: ");
p.math = Integer.parseInt(reader.readLine());
System.out.print("国語の点数を入力: ");
p.japanese = Integer.parseInt(reader.readLine());
System.out.print("英語の点数を入力: ");
p.english = Integer.parseInt(reader.readLine());
System.out.println(p.name + "さんの数学の成績 = " + p.math);
System.out.println(p.name + "さんの国語の成績 = " + p.japanese);
System.out.println(p.name + "さんの英語の成績 = " + p.english);
}
}
|