admininterface.java
来自「国外的数据结构与算法分析用书」· Java 代码 · 共 29 行
JAVA
29 行
package Interfaces;
/** The interface for administrative personnel. Special input operations
and error messages that are only valid for administrative personnel. */
public class AdminInterface extends StaffInterface
{
/** Obtain the integer that represents the command to be performed. */
public int getCmdID()
{
System.out.println("\nChoose an admin command:");
System.out.println("11. Balance");
System.out.println("12. Deposit");
System.out.println("21. Change line of credit");
System.out.println("22. Generate month end statements");
System.out.println("99. Quit");
System.out.print("Choice: ");
String temp = readString();
return Integer.parseInt(temp);
}
/** Obtain the new line of credit. */
public float getNewLoc()
{
System.out.print("Enter the new line of credit: ");
String temp = readString();
return Float.parseFloat(temp);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?