C#汽车租赁系统 完整版

该博客介绍了使用C#编程语言开发的一款汽车租赁系统的详细内容。主要涉及到Truck.cs类的设计以及主窗体的代码实现,提供了系统的核心功能展示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

 Truck.cs类

      //卡车类
    public class Truck : Vehicle1
    {
        //重载
        public int Load { get; set; }
        //构造函数
        public Truck(string color, double dailyrent, string licenseNO, string name, int rentDate, string rentUser, int yearsOfService, int load)
          :base(color, dailyrent, licenseNO, name, rentDate, rentUser, yearsOfService)
        {
            this.Load = load;
        }
        //计算价格
        public override double CalcPrice()
        {
             double Price = 0;
             Price = this.DailyRent * this.RentDate;
             return Price;
        }
    }
}
Vehicle1.cs类
   //交通工具类
  public abstract  class Vehicle1
    {
      //颜色
      public string Color { get; set; }
      //日租金
      public double DailyRent { get; set; }
      //车牌号
      public string LicenseNO { get; set; }
      //车的名称
      public string Name { get; set; }
      //时间
      public int RentDate { get; set; }
      //使用人
      public string RentUser { get; set; }
      //使用天数
      public int YearsOfService { get; set; }
      //构造函数
      public Vehicle1(string color, double dailyrent, string licenseNO, string name, int rentDate, string rentUser, 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值