?? agendaservice.java
字號(hào):
import java.io.*;
import agenda.*;
/**
*@author haha
*/
/**
* 程序執(zhí)行用戶界面
*/
public class AgendaService
{
public AgendaService()
{
System.out.println("若注冊(cè)用戶請(qǐng)輸入:register userName password");
System.out.println("若添加請(qǐng)輸入:add userName password other startTime endTime title");
System.out.println("若查詢請(qǐng)輸入:query userName password startTime endTime");
System.out.println("若刪除請(qǐng)輸入:delete userName password meetingId");
System.out.println("若清除請(qǐng)輸入:clear userName password");
System.out.println("時(shí)間格式輸入方式為:00:00");
}
public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException
{
AgendaService agenda = new AgendaService();
Agenda ag = new Agenda();
String [] command =null;
System.out.print("$");
try
{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str = buf.readLine();
command = str.split("[ \t]+");
//System.out.println(command[0]);
} catch (Exception exc) {
System.out.println("Wrong command");
}
while(!command[0].equals("quit"))
{
Command cmd = CommandFactory.getCommand(command[0].toString().toLowerCase());
ag = cmd.excute(ag,command);
System.out.print("$");
try
{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str = buf.readLine();
command = str.split("[ \t]+");
} catch (Exception exc) {
System.out.println("Wrong command");
}
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -