搞定:
1: sideA = a; sideB = b; sideC = c;
2: (sideA+sideB)>sideC&&(sideA-sideB)
4: boo = false;
5: length = sideA + sideB + sideC; return length;
6: sideA = a; sideB = b; sideC = c;
7: (sideA + sideB)>sideC&&(sideA-sideB)
9: boo = false;
10: above = a; bottom = b; height = c;
11: area = (above + bottom) * height /2; return area;
12: radius = r;
13: area = Math.PI * radius * radius; return area;
14: return 2 * Math.PI * radius;
15: circle = new Circle(1);
16: trangle = new Trangle(1,1,1.5);
17: lader = new Lader(1,2,2);
18: length = circle.getLength();
19: area = circle.getArea();
20: length = trangle.getLength();
21: area = trangle.getArea();
22: area = lader.getArea();
23: trangle = new Trangle(12,6,2);
24: length = trangle.getLength();
25: area = trangle.getArea();
搞定了,其实挺简单的,就是写起来很多..