It ispArea = new polyArea(this,(float)10000.0)not float(10000.0)the default type of floating point number is double. Since you need float thenyou have to cast double into float.