package test;
import java.util.Scanner;
public class J_ava8 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
Student []s=new Student[3];
for(Student S:s){
System.out.println("Please input the student's name:");
S.setName(in.nextLine());
System.out.println("Please input the number:");
S.setNumber(in.nextLine());
System.out.println("Please input the ChieseScore:");
S.setChineseScore(in.nextInt());
System.out.println("Please input the MathScore:");
S.setMathScore(in.nextInt());
System.out.println("Please input the EnglisnScore");
S.setEnglishScore(in.nextInt());
in.close();
}
for(Student S:s){
S.ShowAllInfo();
}
}
}
class Student{
private String Name;
private String Number;
private int ChineseScore;
private int MathScore;
private int EnglishScore;
public void setName(String name){
Name=name;
}
public void setNumber(String number) {
Number = number;
}
public void setChineseScore(int chineseScore) {
ChineseScore= chineseScore;
}
public void setMathScore(int mathScore) {
MathScore = mathScore;
}
public void setEnglishScore(int englishScore) {
EnglishScore = englishScore;
}
public void ShowAllInfo(){
System.out.println("name:"+Name+"number"+Number+"chineseScore"+ChineseScore+"mathScore"+MathScore+"englishScore"+EnglishScore);
}
}