java编写一个汽车出租管理程序_怎么用java做汽车出租管理程序

展开全部

车辆出租管理系统 一、项目功能:设计程序,可以管理各种出租汽车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+

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值