美文网首页
每日总结-第四十七天-soot

每日总结-第四十七天-soot

作者: SamiraG | 来源:发表于2020-06-09 12:20 被阅读0次

    使用

    下载: https://soot-build.cs.uni-paderborn.de/public/origin/develop/soot/soot-develop/build/
    test file:

    package TriangleClass;
    
    public class Triangle {
    
    
        public String triangle(int a, int b, int c){
    
            if(a > 0 && b > 0 && c >0){
                if(a + b >c)
                {
                    if(a == b || b ==c || a ==c)
                    {
                        if(a == b && b == c)
                        {
                            return "equilateral";
                        }
                        return "isosceles";
                    }
                    else{
                        return "scalene";
                    }
                }
                else{
                    return "Not Triangle";
                }
            }
            else{
                return "Not Triangle";
            }
    
    
    
        }
    
        public int a;
        public int b;
        public int c;
    
    }
    
    javac Triangle.java
    java -cp soot-trunk.jar soot.tools.CFGViewer --soot-classpath .;"%JAVA_HOME%"\jre\lib\rt.jar TriangleClass.Triangle
    

    相关文章

      网友评论

          本文标题:每日总结-第四十七天-soot

          本文链接:https://www.haomeiwen.com/subject/gfndtktx.html