package J20250715.studentManager;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author WanJl
 * @version 1.0
 * @title Main
 * @description
 * @create 2025/7/15
 */
public class Main {
    public static void main(String[] args) {
        //创建键盘输入对象
        Scanner sc = new Scanner(System.in);
        //创建集合容器，用来存储多个学生
        ArrayList<Student> list = new ArrayList<>();
        while (true) {

            System.out.println("--------欢迎进入学生管理系统--------");
            System.out.println("1 添加学生");
            System.out.println("2 删除学生");
            System.out.println("3 修改学生");
            System.out.println("4 查看学生");
            System.out.println("5 退出系统");
            System.out.println("请输入您的选择：");
            int i = sc.nextInt();
            switch (i) {
                case 1:
                    StudentManagerSystem.addStudent(list);
                    break;
                case 2:
                    break;
                case 3:
                    StudentManagerSystem.updateStudent(list);
                    break;
                case 4:
                    StudentManagerSystem.queryStudentList(list);
                    break;
                case 5:
                    System.out.println("正在退出系统...");
                    return;
            }

        }
    }
}
