1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Text;
 5 using System.Threading.Tasks;
 6 
 7 namespace PK10.Etity
 8 {
 9     /// <summary>
10     /// 父类
11     /// </summary>
12     public abstract class Vebicle
13     {
14         //颜色
15         public string Color { get; set; }
16         /// <summary>
17         ///租金
18         /// </summary>
19         public double DailyRent { get; set; }
20         //车牌号
21         public string LicenseNo { get; set; }
22         //车名
23         public string Name { get; set; }
24         //租用天数
25         public int RentDate { get; set; }
26         //租用人
27         public string RentUser { get; set; }
28         //租用时间
29         public int YearsOfService { get; set; }
30 
31         public string Load { get; set; }
32         /// <summary>
33         /// 构造函数
34         /// </summary>
35         /// <param name="color"></param>
36         /// <param name="dilyrent"></param>
37         /// <param name="licenseno"></param>
38         /// <param name="name"></param>
39         /// <param name="rentdate"></param>
40         /// <param name="rentuser"></param>
41         /// <param name="yearofservice"></param>
42         public Vebicle(string load, string color, double dailyrent, string licenseno, string name, int yearofservice)
43         {
44             this.Color = color;
45             this.DailyRent = dailyrent;
46             this.LicenseNo = licenseno;
47             this.Name = name;
48             this.Load = load;
49             //this.RentDate = rentdate;
50             this.YearsOfService = yearofservice;
51         }
52         /// <summary>
53         /// 结算总金额的抽象方法
54         /// </summary>
55         /// <returns></returns>
56         public abstract double Money();
57         public Vebicle()
58         { }
59     }
60 }
View Code 父类

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
相关资源
相似解决方案