class MyShape { MySegment[] segs; // members of class int numSegments; // Constructor MyShape(int numInputSegments, MySegment[] inputSegments){ numSegments = numInputSegments; segs = new MySegment[numSegments]; for(int i=0; i