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.

27 lines
599 B

package tiaozhanti1;
import java.util.ArrayList;
import java.util.List;
import jichuti1.Reader;
/**
* 学院类
*/
public class College {
private String collegeId; // 学院ID
private String name; // 学院名称
private List<Reader> students; // 学院学生(读者)
public College(String collegeId, String name) {
this.collegeId = collegeId;
this.name = name;
this.students = new ArrayList<>();
}
// 添加学生
public void addStudent(Reader student) {
students.add(student);
}
}