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.
32 lines
783 B
32 lines
783 B
package tiaozhanti1;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import jinjieti1.BranchLibrary;
|
|
|
|
/**
|
|
* 大学图书馆系统
|
|
*/
|
|
public class UniversityLibrarySystem {
|
|
private String systemId; // 系统ID
|
|
private List<BranchLibrary> libraries; // 包含的分馆
|
|
private List<College> colleges; // 关联的学院
|
|
|
|
public UniversityLibrarySystem(String systemId) {
|
|
this.systemId = systemId;
|
|
this.libraries = new ArrayList<>();
|
|
this.colleges = new ArrayList<>();
|
|
}
|
|
|
|
// 添加分馆
|
|
public void addLibrary(BranchLibrary library) {
|
|
libraries.add(library);
|
|
}
|
|
|
|
// 添加学院
|
|
public void addCollege(College college) {
|
|
colleges.add(college);
|
|
}
|
|
}
|