📄 agendaservice.java
字号:
import java.io.*;
import agenda.*;
/**
*@author haha
*/
/**
* 程序执行用户界面
*/
public class AgendaService
{
public AgendaService()
{
System.out.println("若注册用户请输入:register userName password");
System.out.println("若添加请输入:add userName password other startTime endTime title");
System.out.println("若查询请输入:query userName password startTime endTime");
System.out.println("若删除请输入:delete userName password meetingId");
System.out.println("若清除请输入:clear userName password");
System.out.println("时间格式输入方式为: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");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -