The class Triangle {
Double a, b, c;
Double l, s;
Public Triangle (double a, b double, double c) {
Enclosing a=a;
This. B=b;
This. C=c;
}
Public void zhochang () {
L=a + b + c;
System. The out. Println (" circumference: "+ l);
}
Public void mianji () {
Double p=(a + b + c)/2;
S=Math. SQRT ((p - a) * p * (p - b) * (p - c));
System. The out. Println (" area: "+ s);
}
}
Public class circumference triangle area {
Public static void main (String [] args) {
Triangle z=new Triangle,2,2 (2);
Z.z hochang ();
Z.m ianji ();
}
}