From 48c37550a58d0b10ec8d9247d2a859c87ba4b13e Mon Sep 17 00:00:00 2001 From: msksbr Date: Sun, 16 Jun 2024 16:01:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E5=85=AB=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E9=A2=98=E5=86=99=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 实验8/src/step2/AddTimeTable.java | 3 ++- 实验8/src/step2/test.java | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 实验8/src/step2/test.java 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); + } +}