1 packageStudent;2 importjava.util.Scanner;3 importjava.util.ArrayList;4 public classStudentManager5 {6 public static voidmain(String[] args)7 {8 Scanner input=newScanner(System.in);9 ArrayList stu=new ArrayList();10 int select=1;11 for(;;)12 {13 face();14 do
15 {16 select=input.nextInt();17 }while(select<1||select>5);18 switch(select)19 {20 case 1:showStudent(stu);break;21 case 2:addStudent(stu);break;22 case 3:deleteStudent(stu);break;23 case 4:updateStudent(stu);break;24 case 5:selectStudent(stu);break;25 }26 }27 }28 private static void addStudent(ArrayListstu)29 {30 Student stu0=newStudent();31 String a, b,f;32 intc;33 boolean d=false,j=true;34 Double e;35
36 Scanner input=newScanner(System.in);37 System.out.println("请依次输入:学号、姓名、年龄、性别、成绩");38 a=input.next();39 b=input.next();40 c=input.nextInt();41 f=input.next();42 e=input.nextDouble();43 if(stu.size()!=