/** * Copyright (c) Wishnu Prasetya, 2009. */ package Hypotheek; import static Hypotheek.Util.* ; /** * @author Wishnu Prasetya */ public class EigenWoningForfait2007 extends EigenWoningForfait { @Override public int calc(int WOZ) { assert WOZ>=0 : "PRE" ; if (WOZ <= euro2cent(12000)) return 0 ; if (WOZ <= euro2cent(25000)) return toInt(calcPercentage(0.2f,WOZ)) ; if (WOZ <= euro2cent(50000)) return toInt(calcPercentage(0.3f,WOZ)) ; if (WOZ <= euro2cent(75000)) return toInt(calcPercentage(0.4f,WOZ)) ; return toInt(calcPercentage(0.55f,WOZ)) ; } static public void main(String[] args) { EigenWoningForfait2007 F = new EigenWoningForfait2007() ; for (int WOZ = 10000; WOZ < 250000; WOZ += 10000) { System.out.print("WOZ = " + WOZ) ; System.out.println(", EWF = " + cent2euro(F.calc(WOZ*100))) ; } } }