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

📄 instructor.java

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

import Sets.DepartmentSet;
import dslib.list.LinkedListUos;

/**	Defines an instructor at the university. */
public class Instructor extends Staff
{
	
	/**	Create a new instructor with a name and password */
	public Instructor(String n, String pwd, int deptNum)
	{
		name = n;
		password = pwd;
		department = DepartmentSet.getDepartment(deptNum);
		department.addInstructor(this);
		classes = new LinkedListUos();
	}
	
	/**	The  classes the instructor is teaching */
	protected LinkedListUos classes;

	/**	The department the instructor belongs */
	protected Department department;

	/**	Return the department */
	public Department department()
	{
		return department;
	}
	
	/**	Add a section to the list of courses this instructor teaches */
	public void addCourse(CourseSection courseSec)
	{
		classes.insert(courseSec);
	}
	
	/**	Return a string representation of the instructor */
	public String toString()
	{
		return  name ;
	}

} /* end of Instructor */

⌨️ 快捷键说明

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