admininterface.java
来自「国外的数据结构与算法分析用书」· Java 代码 · 共 42 行
JAVA
42 行
package Interfaces;
/** An administrator's interface which is an extension
on an instructor's interface */
public class AdminInterface extends InstructorInterface
{
/** constructor */
public AdminInterface(){}
/** Display the ADMIN menu and return the user's choice */
public int getCommandID()
{
System.out.println("\n 20. Student's grades ");
System.out.println(" 21. Class list ");
System.out.println(" 22. Check course section enrollment");
System.out.println(" 40. Set course-sections enrollment limit ");
System.out.println(" 41. Assign instructor to course section ");
System.out.println(" 42. Assign a room to a course section ");
System.out.println(" 99. Quit");
return (int)readInput("\n Enter a choice : ");
}
/** Prompt the user for an enrollement limit */
public int getCourseLimit()
{
return (int)readInput("\nEnter the new enrollment limit : ");
}
/** Prompt the user for a room */
public String getRoom()
{
return readString("\nEnter a room : ");
}
/** Prompt the user for an instructor's name and return it */
public String getInstructorName()
{
return readString("\nEnter the name for the instructor : ");
}
} /* end of AdminInterfac */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?