⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 college.java

📁 国外的数据结构与算法分析用书
💻 JAVA
字号:
package Entities;

import dslib.dictionary.arrayed.ArrayedPKeyedDictUos;
import dslib.list.LinkedListUos;

public class College
{

	/**	Data Attributes */

	protected String name; 
   
	public ArrayedPKeyedDictUos students;
   
	protected LinkedListUos departments;
   
	/**	Make a college with name 'collegeName' */
	public College(String collegeName) 
 	{
		name = collegeName;
		students = new ArrayedPKeyedDictUos(100);
		departments = new LinkedListUos();
	}

	
	/**	Add student 'newStudent' to the current college. */
	public void addStudent(Student newStudent)
	{
		/**	insert student and make a mapping from their
			student number to them */
		students.insert(new Integer(newStudent.studentNum()), newStudent);
	}

	/**	Add a new department to this college */
	public void addDepartment(Department newDepart)
	{
		departments.insert(newDepart);
	}

} /* end of College */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -