public class XIV1ii {
XIV1i[] a = new XIV1i[100];
public void add(XIV1i vip) {
for (int i = 0; i < a.length; i++) {
if (a[i] == null) {
a[i] = vip;
break;
}
}
}
public void show() {
for (int i = 0; i < a.length; i++) {
if (a[i]!= null)
System.out.print(a[i].vipNumber + " " +a[i].vipScore);
}
}
}
import java.util.Scanner;
public class XIV1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
XIV1ii x = new XIV1ii();
XIV1i[] v = new XIV1i[1];
for (int i = 0; i < 1; i++) {
System.out.print("输入会员编号:");
v[i] = new XIV1i();
v[i].vipNumber = in.nextInt();
v[i].vipScore = in.nextInt();
x.add(v[i]);
}
System.out.println("***会员列表***");
System.out.println("编号");
x.show();
}
}