package s1;
public class Student {
String no;
String name;
int k, e, m, t;
Student(String no, String name, int k, int e, int m){
this.no=no;
this.name=name;
this.k=k;
this.e=e;
this.m=m;
}
void tot() {
t = k+e+m;
}
void output() {
System.out.printf("%4s, %6S, %4d %4d %4d %4d\n",no, name,k,e,m,t);
}
public static void main(String [] args) {
Student s[];
s=new Student[3];
s[0]= new Student("001","김민우",99,100,100);
s[1]= new Student("001","김민우",99,100,100);
s[2]= new Student("001","김민우",99,100,100);
for(int i=0;i<3;i++) {
s[i].tot();
}
for(int i=0;i<3;i++) {
s[i].output();
}
}
}