?? mshowallcommand.java
字號:
package cmd;import core.*;import db.*;import java.util.List;public class MShowAllCommand extends MDatabaseCommand{ private static final String [] PARAM_NAMES = { }; private static final String [] PARAM_PROMPTS = { }; public MShowAllCommand () throws java.io.IOException { super (); } public String [] getParameterNames () { return PARAM_NAMES; } public String [] getParameterPrompts () { return PARAM_PROMPTS; } public boolean isInitialized () { return true; } protected void executeDatabaseCommand (HotelDB database) { List reservations = database.getReservations(); displayResults ("All Reservations", reservations); } protected void displayResultsText (String title, List reservations) { System.out.println (title); if (reservations.size() > 0) DBUtilities.displayReservations (reservations); else System.out.println ("No reservations in database."); } public String getMenuName () { return "Show All"; } public String getName () { return "all"; } public String getDescription () { return "Shows all the reservations"; } public Command makeInstance () { try { return new MShowAllCommand (); } catch (java.io.IOException e) { return null; } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -