From 06a701d3002ce902c419024ba86c9d55443a2667 Mon Sep 17 00:00:00 2001 From: wuqiuyu <2135752554@qq.com> Date: Thu, 16 Apr 2026 10:31:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'w6-=E5=B7=AB=E7=A7=8B=E9=9B=A8-202506050320'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- w6-巫秋雨-202506050320/ExcelReport.java | Bin 0 -> 1024 bytes w6-巫秋雨-202506050320/OldReport.java | Bin 0 -> 1024 bytes w6-巫秋雨-202506050320/PdfReport.java | 6 ++++++ w6-巫秋雨-202506050320/ReportInter.java | 4 ++++ w6-巫秋雨-202506050320/TestReport.java | 10 ++++++++++ 5 files changed, 20 insertions(+) create mode 100644 w6-巫秋雨-202506050320/ExcelReport.java create mode 100644 w6-巫秋雨-202506050320/OldReport.java create mode 100644 w6-巫秋雨-202506050320/PdfReport.java create mode 100644 w6-巫秋雨-202506050320/ReportInter.java create mode 100644 w6-巫秋雨-202506050320/TestReport.java diff --git a/w6-巫秋雨-202506050320/ExcelReport.java b/w6-巫秋雨-202506050320/ExcelReport.java new file mode 100644 index 0000000000000000000000000000000000000000..06d7405020018ddf3cacee90fd4af10487da3d20 GIT binary patch literal 1024 ScmZQz7zLvtFd70QH3R?z00031 literal 0 HcmV?d00001 diff --git a/w6-巫秋雨-202506050320/OldReport.java b/w6-巫秋雨-202506050320/OldReport.java new file mode 100644 index 0000000000000000000000000000000000000000..06d7405020018ddf3cacee90fd4af10487da3d20 GIT binary patch literal 1024 ScmZQz7zLvtFd70QH3R?z00031 literal 0 HcmV?d00001 diff --git a/w6-巫秋雨-202506050320/PdfReport.java b/w6-巫秋雨-202506050320/PdfReport.java new file mode 100644 index 0000000..4261c7c --- /dev/null +++ b/w6-巫秋雨-202506050320/PdfReport.java @@ -0,0 +1,6 @@ +public class PdfReport implements ReportInter{ + @Override + public void generate() { + System.out.println("生成PDF报表"); + } +} \ No newline at end of file diff --git a/w6-巫秋雨-202506050320/ReportInter.java b/w6-巫秋雨-202506050320/ReportInter.java new file mode 100644 index 0000000..e3df759 --- /dev/null +++ b/w6-巫秋雨-202506050320/ReportInter.java @@ -0,0 +1,4 @@ + +public interface ReportInter { + void generate(); +} \ No newline at end of file diff --git a/w6-巫秋雨-202506050320/TestReport.java b/w6-巫秋雨-202506050320/TestReport.java new file mode 100644 index 0000000..86d6137 --- /dev/null +++ b/w6-巫秋雨-202506050320/TestReport.java @@ -0,0 +1,10 @@ +public class TestReport { + public static void main(String[] args) { + // 多态调用 + ReportInter r1 = new PdfReport(); + r1.generate(); + + ReportInter r2 = new ExcelReport(); + r2.generate(); + } +} \ No newline at end of file