Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.4 kB
1
Indexable
Never
StudentManagement std = new StudentManagement();
        std.addStudent(new Student("Nguyen Van An", "17020001", "17020001@vnu.edu.vn"));
        students[0].setGroup("K62CC");
        std.addStudent(new Student("Nguyen Van E", "17020005", "17020005@vnu.edu.vn"));
        students[1].setGroup("K62CD");
        std.addStudent(new Student("Nguyen Van C", "17020003", "17020003@vnu.edu.vn"));

        std.addStudent(new Student("Nguyen Van D", "17020004", "17020004@vnu.edu.vn"));
        std.addStudent(new Student("Nguyen Van F", "17020006", "17020002@vnu.edu.vn"));
        students[4].setGroup("K62CD");
        std.addStudent(new Student("Nguyen Van G", "17020007", "17020001@vnu.edu.vn"));
        students[5].setGroup("K62CA");
        std.addStudent(new Student("Nguyen Van H", "17020008", "17020005@vnu.edu.vn"));
        students[6].setGroup("K62CD");
        std.addStudent(new Student("Nguyen Van I", "17020009", "17020003@vnu.edu.vn"));

        std.addStudent(new Student("Nguyen Van L", "17020010", "17020004@vnu.edu.vn"));
        std.addStudent(new Student("Nguyen Van M", "17020011", "17020002@vnu.edu.vn"));
        students[8].setGroup("K62CC");
        System.out.println(std.studentsByGroup());

        //System.out.println(std.studentsByGroup());
        std.removeStudent("17020007");
        System.out.println(std.studentsByGroup());