question: public static double area ( Enumeration < Geo > vs ) { int count = 0 ; double area = 0 ; Geo v0 = vs . nextElement ( ) ; Geo v1 = vs . nextElement ( ) ; Geo p0 = v0 ; Geo p1 = v1 ; Geo p2 = null ; while ( vs . hasMoreElements ( ) ) { count ++ ; p2 = ( Geo ) vs . nextElement ( ) ; area += angle ( p0 , p1 , p2 ) ; p0 = p1 ; p1 = p2 ; } count ++ ; p2 = v0 ; area += angle ( p0 , p1 , p2 ) ; p0 = p1 ; p1 = p2 ; count ++ ; p2 = v1 ; area += angle ( p0 , p1 , p2 ) ; return area - ( count - 2 ) * Math . PI ; }
target:  Computes the area of a polygon on the surface of a unit sphere given an enumeration of its point. For a non unit sphere, multiply this by the radius of sphere squared. Make sure the first point doesn't equal the last.