diff --git a/实验8/src/step2/AddTimeTable.java b/实验8/src/step2/AddTimeTable.java index 833dce4..61d50fb 100644 --- a/实验8/src/step2/AddTimeTable.java +++ b/实验8/src/step2/AddTimeTable.java @@ -1,3 +1,4 @@ +//test.java package step2; import java.io.File; @@ -10,7 +11,7 @@ public class AddTimeTable { public static void start(String time1, String time2) throws IOException { /********** Begin *********/ - File file = new File("src/step2/AddTimeTable.java"); + File file = new File("src/step2/Time_Table.txt"); FileWriter writer = new FileWriter(file); writer.write(time1); writer.write(LINE_SEPARATOR); diff --git a/实验8/src/step2/test.java b/实验8/src/step2/test.java new file mode 100644 index 0000000..5bb373f --- /dev/null +++ b/实验8/src/step2/test.java @@ -0,0 +1,13 @@ +//test.java +package step2; + +import java.io.IOException; + +public class test { + public static void main(String[] args) throws IOException { + AddTimeTable addTimeTable = new AddTimeTable(); + String time1 = "T246 | 郑州 | 青岛 | 15:00 | 23:00 | 8小时"; + String time2 = "K765 | 西宁 | 拉萨 | 16:00 | 14:00+1 | 22小时"; + addTimeTable.start(time1, time2); + } +}