分页:
上一页 1 2 3 4 5 6 7 8 [9]
}
}
public class rectangle entend __(5)__
{
double la;
double lb;
double lc;
public triangle(double la ,double lb,double lc){
this.la=la; this.lb=lb; this.lc=lc;
}
public string tostring(){
return” triangle:sides=”+la+”, ”+lb+”, ”+lc+”:”;
}
public double get area(){
double s=(la+lb+lc)/2.0;
return math.sqrt(s*(s-la) *(s-lb) *(s-lc));
}
}