policy.java

来自「使用Drool规则引擎开发关于保险评估的一个案例。仅供参考」· Java 代码 · 共 58 行

JAVA
58
字号
package org.acme.insurance.base;/** * This represents a policy that a driver is applying for. * <p/> * Obviously in the real world, there are actuaries to mess things up, but lets just pretend there is * some simple base price and discount that we can calculate with relatively simple rules ! */public class Policy {    private int driverId;    private boolean approved = false;    private int discountPercent = 0;    private double basePrice;    private double insurancePrice;    public double getInsurancePrice() {        return insurancePrice;    }    public void setInsurancePrice(double insurancePrice) {        this.insurancePrice = insurancePrice;    }    public boolean isApproved() {        return approved;    }    public void setApproved(boolean approved) {        this.approved = approved;    }    public double getBasePrice() {        return basePrice;    }    public void setBasePrice(double basePrice) {        this.basePrice = basePrice;    }    public int getDiscountPercent() {        return discountPercent;    }    public void setDiscountPercent(int discountPercent) {        this.discountPercent = discountPercent;    }    public int getDriverId() {        return driverId;    }    public void setDriverId(int driverId) {        this.driverId = driverId;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?