You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
720 B
20 lines
720 B
挑战题—Person
|
|
|
|
public class PersonManagerTest {
|
|
public static void main(String[] args) {
|
|
PersonManager manager = new PersonManager();
|
|
Student student1 = new Student("张三", 18, "S001", 95.5);
|
|
Student student2 = new Student("李四", 19, "S002", 88.0);
|
|
|
|
Teacher teacher1 = new Teacher("王老师", 35, "T001", "数学");
|
|
Teacher teacher2 = new Teacher("李老师", 40, "T002", "英语");
|
|
|
|
manager.addPerson(student1);
|
|
manager.addPerson(student2);
|
|
manager.addPerson(teacher1);
|
|
manager.addPerson(teacher2);
|
|
|
|
manager.displayAllPersons();
|
|
manager.processSpecificAttributes();
|
|
}
|
|
}
|