?? instructor.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 + -