test.java
来自「Java编写个人日程管理工具, 具有添加编辑日程和自动适应功能, 程序包含完整的」· Java 代码 · 共 52 行
JAVA
52 行
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package test;import java.io.*;import java.util.StringTokenizer;import ui.*;import logical.*;/** * 基于命令行的用户交互界面 * @author zouhao */public class Test { Show show; AgendaService agenda; String input; boolean success; BufferedReader keybaord = new BufferedReader(new InputStreamReader(System.in)); public Test() { try{ show = Show.getInstance(); success =false; System.out.println("Test the program"); input = "batch test.txt"; StringTokenizer stringtoken = new StringTokenizer(input); String temp=stringtoken.nextToken(); Command command = CommandFactory.factory(temp); command.parse(input); success = command.Execute(); if(success) { System.out.println("Success to test!"); } else {System.out.println("Fail to test!");} System.exit(0); } catch (Exception e){} } void CommandHead() { System.out.print("$"); } public static void main(String[] args) { Test test = new Test(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?