From 40170af2aef1e90483ca4e3d5cb31948772a0282 Mon Sep 17 00:00:00 2001 From: Fuyuxinge <1876397977@qq.com> Date: Thu, 2 Apr 2026 14:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=9B=BE=E5=BD=A2=E9=9D=A2?= =?UTF-8?q?=E7=A7=AF=E8=AE=A1=E7=AE=97=E5=99=A8=E9=87=8D=E6=9E=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- w4/Car.java | 0 w4/TestCar.java | 36 ------------------------------------ 2 files changed, 36 deletions(-) delete mode 100644 w4/Car.java delete mode 100644 w4/TestCar.java diff --git a/w4/Car.java b/w4/Car.java deleted file mode 100644 index e69de29..0000000 diff --git a/w4/TestCar.java b/w4/TestCar.java deleted file mode 100644 index c008f31..0000000 --- a/w4/TestCar.java +++ /dev/null @@ -1,36 +0,0 @@ -package w4; - - -public class TestCar { - public static void main(String[] args) { - Car car1 = new Car("京A12345", "丰田", "凯美瑞", 450.0); - Car car2 = new Car("沪B67890", "大众", "帕萨特"); - Car car3 = new Car("粤C54321", "宝马", "3系", 680.0); - - System.out.println("=====初始车辆信息====="); - car1.displayInfo(); - car2.displayInfo(); - car3.displayInfo(); - - - System.out.println("=====测试租车还车====="); - car1.rentCar(); - car1.rentCar(); - car1.returnCar(); - car1.returnCar(); - System.out.println(); - - - System.out.println("=====计算5天租金====="); - double rent = car2.calculateRent(5); - System.out.println("车辆2租用5天总费用:" + rent + "元\n"); - - - System.out.println("=====测试非法修改租金====="); - car3.setDailyRent(-100); - System.out.println(); - - System.out.println("=====车辆总数统计====="); - System.out.println("系统中总车辆数:" + Car.getTotalCars()); - } -}