import java.util.Scanner;
public class XiTi5 {
class IllegalTrianleException extends Exception{
double s1;
double s2;
double s3;
double getL1() {
return s1;
}
double getL2() {
return s2;
}
double getL3() {
return s3;
}
IllegalTrianleException(double l1,double l2,double l3)
{this.s1=s1; }
{this.s2=s2; }
{this.s3=s3; }
public class Triangle
{
double side1,side2,side3;
Triangle(double s1,double s2,double s3) throws IllegalTrianleException
{
if(!(s1+s2>s3)&&(s1+s3>s2)&&(s2+s3>s1))
{
throw new IllegalTrianleException(s1, s2, s3);
}
side1=s1; side2=s2; side3=s3;
}
}
}
public static void main(String[] args) {
XiTi5 t=new XiTi5();
Scanner in=new Scanner(System.in);
System.out.println("请输入三边长度");
double a=in.nextDouble();
double b=in.nextDouble();
double c=in.nextDouble();
try{
Triangle d=new Triangle(a);
Triangle e=new Triangle (b);
Triangle f=new Triangle (c);
}
catch(IllegalTrianleException e)
{
System.out.println(e.getMessage());
}
}
}