展开全部
车辆出租管理系统 一、项目功能:设计程序,可以管理各种出租汽车e69da5e887aa62616964757a686964616f31333332623331并计算其租金。说明:程序主要管理货车类Truck 、客车类 Bus、小车类Car三中车辆 二、UML图:main( )TestCar
三、源码:abstract class Vehicle{ protected String number;//车牌号 protected String type;//车类型 protected double value;//购车价格 protected double rentPrice;//租车单价 protected double rentKilometers;//租车里程数 protected double rent;//租金 public Vehicle(String number,String type,double value,double rentPrice)//设置车牌号、类型、价格、租车单价 { this.number=number; this.type=type; this.value=value; this.rentPrice=rentPrice; } public void setRentKilometers(double rentKilometers)//设置租车里程数 { this.rentKilometers=rentKilometers;} public double getRentKilometers()//返回租车里程数 {return rentKilometers;} public abstract void calcuRent();//计算租金 public double getRent()//返回租金 {return rent;} public void printBasicInfo()//返回车的基本信息 { System.out.println("车牌:"+number+