某车辆租赁公司转租多种面包车和货车,转租费用以日为单位。

  车型

  货车

  货车(金杯、金龙)

  雪佛兰商务舱GL8

  奔驰55i

  别克商务租赁_别克商务车租赁服务_别克商务租赁价格

  雪佛兰林萌大街

  16座

  日租费(元)

  600

  别克商务租赁_别克商务租赁价格_别克商务车租赁服务

  500

  300

  800

  1500

  别克商务租赁价格_别克商务车租赁服务_别克商务租赁

   /**

    *[汽车][5]抽象类
    */
    public abstract class Qiche {
        public static String no;
        public static String brand;
        /**
         * 无参构造方法
         */
        public Qiche() {
            no = "京AU8769";
            brand = "宝马";
        }
        /**
         * 有参构造方法
         * 
         * @param no
         * @param brand
         */
        public Qiche(String no, String brand) {
            this.no = no;
            this.brand = brand;
        }
        /**
         * 计算租金
         * 父类的抽象方法指引子类去重写方法
         * @return
         */
        public abstract double zujin(int days,int type);

   /**

    *汽车类,抽象类,一般把父类都写成抽象类
    *[轿车][6]类继承父类
    */
    public final class Jiaoche extends Qiche {
        private String type;
        public String getType() {
            return type;
        }
        public void setType(String type) {
            this.type = type;
        }
        /**
         * 无参构造方法
         */
        public Jiaoche() {
            type = "商务舱";
        }
        /**
         * 有参构造方法
         */
        public Jiaoche(String type) {
            super(no, brand);
            this.type = type;
        }
        public double zujin(int days, int type) {
            double money = 0;
            switch (type) {
            case 1:// 1代表宝马550i
                money = days * 500;
                break;
            case 2:// 2代表别克商务舱
                money = days * 600;
                break;
            case 3://别克林萌大道
                money = days * 300;
                break;
            default:
                System.out.println("输入错误!");
                break;
            }
            return money;
        }

/**
 * [客车][7]类
 * 客车类继承父类
 *
 */
public final class Keche extends Qiche {
    private int seatCount;
    public int getSeatCount() {
        return seatCount;
    }
    public void setSeatCount(int seatCount) {
        this.seatCount = seatCount;
    }
    
    
    /**
     * 有参构造方法
     * @param seatCount
     */
    public Keche(int seatCount){
        super(no,brand);
        this.seatCount=seatCount;
    }
    /**
     * 无参构造方法
     */
    public Keche() {
        super();
        // TODO Auto-generated constructor stub
    }
    public Keche(String no, String brand) {
        super(no, brand);
        // TODO Auto-generated constructor stub
    }
    public double zujin(int days,int type){
        double money=0;
        if(type>16){
            money=days*1500;
        }
        if(type
[1]: https://pic.cn2che.com/pics/2013/10/02/big_img/20131002132125579.jpg
[2]: https://img6.baixing.net/e1c2b1995b1414adf0ceee12020d340c.jpg_xl
[3]: https://img4.baixing.net/ff5ad19788f6240413fa58a1a5cc0964.jpg_xl
[4]: https://www.zvpay.cn/index.php/archives/8980/
[5]: https://www.zvpay.cn/index.php/archives/8984/
[6]: https://www.zvpay.cn/index.php/archives/8982/
[7]: https://www.zvpay.cn/index.php/archives/8982/      
分类: 源码分享 标签: 汽车别克商务车租赁服务别克商务租赁价格别克商务车租赁价格轿车客车租赁出租

评论

暂无评论数据

暂无评论数据

目录