public double square() throws TypeOverflowException {
				
		double p = perimeter(); 
		p /= 2;
		double s = p;

		try {
			Iterator<Line> it = lineIterator();
			while(it.hasNext()) {
				s *= p - it.next().distance();
			}
		} catch (OverflowException e) {
			throw new TypeOverflowException();
		}
		if (Double.isInfinite(s) || Double.isNaN(s))
			throw new TypeOverflowException();
		
		return Math.sqrt(s);
		
	}