Class Policy


  • public class Policy
    extends java.lang.Object
    This represents a policy that a driver is applying for. 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 !
    • Constructor Detail

      • Policy

        public Policy()
    • Method Detail

      • isApproved

        public boolean isApproved()
      • setApproved

        public void setApproved​(boolean approved)
      • getDiscountPercent

        public int getDiscountPercent()
      • setDiscountPercent

        public void setDiscountPercent​(int discountPercent)
      • getType

        public java.lang.String getType()
      • setType

        public void setType​(java.lang.String type)
      • applyDiscount

        public void applyDiscount​(int discount)
      • getBasePrice

        public int getBasePrice()
      • setBasePrice

        public void setBasePrice​(int basePrice)