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.
17 lines
545 B
17 lines
545 B
// 主类测试
|
|
public class PersonSystemTest {
|
|
public static void main(String[] args) {
|
|
PersonManager manager = new PersonManager();
|
|
|
|
// 测试添加学生
|
|
Student student = new Student("P001", "张三", 20, "S2023001", "计算机科学与技术");
|
|
manager.addPerson(student);
|
|
|
|
// 测试添加老师
|
|
Teacher teacher = new Teacher("P002", "李四", 35, "T2020001", "计算机学院");
|
|
manager.addPerson(teacher);
|
|
|
|
// 展示所有信息
|
|
manager.showAllPersons();
|
|
}
|
|
}
|