public class PlantType1 extends TreatmentPlant { public PlantType1(Town t, double x) { super(t, x); } public double getCost() { final double c1 = 2.0E-6; final double c2 = 2.0E-15; double unitCost= c1 + c2 * town.getP(); double totalCost= unitCost * town.getP()*x; return totalCost; } public double getMaxRemoved() { if (town.getP() < 0.5E9) return 0.90; else return 0.80; } public double getArea() { return 1.0; } }