import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Constructor;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.Map;
import java.util.Hashtable;
import java.util.List;
import java.util.LinkedList;
import codeassess.javassessment.Assessor;
import codeassess.misc.Misc;

public class Template extends Assessor {

    public Map<String, String> getConfig() {
        final Map<String, String> config = new Hashtable<String, String>();
        config.put("Language", "Java");
        config.put("Extensions", ".java");
        config.put("AssessmentMode", "SemiAutomatic");
        return config;
    }

    public List<Object[]> getProperties() {
        final List<Object[]> properties = new LinkedList<Object[]>();
        properties.add(new Object[] { "Eval0", "Functionality", null, new String[] {  }, "UsoGrupoFiguras.java", "Errores varios", "Errores varios", 0.0 });
        properties.add(new Object[] { "Eval1", "Functionality", null, new String[] {  }, "Volumen.java", "Debes crear una interfaz que implemente el método numeroCirculos", "Crear nueva interfaz", 0.0 });
        properties.add(new Object[] { "Eval2", "Functionality", null, new String[] {  }, "Circular.java", "La clase debe ser una interfaz", "CIRCULAR) Implementar la interfaz", 0.1 });
        properties.add(new Object[] { "Eval11", "Functionality", null, new String[] {  }, "Figura.java", "La clase Figura no debe heredar de ninguna clase", "FIGURA) Figura no debe heredar de ninguna clase", 0.0 });
        properties.add(new Object[] { "Eval12", "Functionality", null, new String[] {  }, "Figura.java", "La clase Figura no debe tener nuevos atributos ni métodos", "FIGURA) La clase Figura no debe tener nuevos atributos ni métodos", 0.0 });
        properties.add(new Object[] { "Eval10", "Functionality", null, new String[] {  }, "Circular.java", "La clase debe ser tener solo un método", "CIRCULAR) Implementar la interfaz correctamente", 0.1 });
        properties.add(new Object[] { "Eval5", "Functionality", null, new String[] {  }, "Circulo.java", "Debes implementar el método numeroCirculos", "CIRCULO) La clase Circulo implementa el método numeroCirculos", 0.1 });
        properties.add(new Object[] { "Eval6", "Functionality", null, new String[] {  }, "Cilindro.java", "Debes implementar el método numeroCirculos", "CILINDRO) La clase Cilindro implementa el método numeroCirculos", 0.1 });
        properties.add(new Object[] { "Eval3", "Functionality", null, new String[] {  }, "Circulo.java", "Circulo debe implementar la nueva interfaz", "CIRCULO) La clase Circulo implementa la interfaz", 0.15 });
        properties.add(new Object[] { "Eval4", "Functionality", null, new String[] {  }, "Cilindro.java", "Cilindro debe implementar la nueva interfaz", "CILINDRO) La clase Cilindro implementa la interfaz", 0.15 });
        properties.add(new Object[] { "Eval7", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Debes implementar el método numeroCirculos", "GRUPOFIGURAS) GrupoFiguras implementa el método numeroCirculos", 0.0 });
        properties.add(new Object[] { "Eval13", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Si hay nuevas figuras en el futuro deberán funcionar", "GRUPOFIGURAS) Si hay nuevas figuras en el futuro deberán funcionar", 0.0 });
        properties.add(new Object[] { "Eval8", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Debes utilizar un bucle para recorrer las figuras", "GRUPOFIGURAS) En el método numeroCirculos se utiliza un bucle para recorrer las figuras", 0.15 });
        properties.add(new Object[] { "Eval9", "Functionality", null, new String[] {  }, "GrupoFiguras.java", "Debes utilizar instance of para ver si la figura tiene círculos", "GRUPOFIGURAS) Implementación incorrecta del método numeroCirculos (p.e., se utiliza instanceof incorrectamente)", 0.15 });
        return properties;
    }

    public boolean checkEval0() {
        return true;
    }
    
    public boolean solveEval0() {
        return false;
    }
    
    public String[] testEval0() {
        return null;
    }

    public boolean checkEval1() {
        return true;
    }

    public boolean solveEval1() {
        return false;
    }

    public String[] testEval1() {
        return null;
    }

    public boolean checkEval2() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public boolean solveEval2() {
        super.intercessor.addFile("Circular.java");
        super.intercessor.addInterface("Circular.java", 1, "Circular");
        return true;
    }

    public String[] testEval2() {
        return null;
    }

    public boolean checkEval11() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        final Class class2 = Object.class;
        if (class2 == null) return false;
        if (super.introspector.checkSuperclass(class1, class2) == false) return false;
        return true;
    }

    public boolean solveEval11() {
        return false;
    }

    public String[] testEval11() {
        return null;
    }

    public boolean checkEval12() {
        final Class class1 = super.introspector.getClass("Figura");
        if (class1 == null) return false;
        if (super.introspector.getDeclaredFieldCount(class1) != 2) return false;
        if (super.introspector.getDeclaredMethodCount(class1) != 0) return false;
        return true;
    }

    public boolean solveEval12() {
        return false;
    }

    public String[] testEval12() {
        return null;
    }

    public boolean checkEval10() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public boolean solveEval10() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            super.intercessor.removeMethods(class1);
            final Class[] classs1 = {  };
            super.intercessor.copyMethod(class1, "Circular.java", "Circular", "numeroCirculos", classs1);
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public String[] testEval10() {
        return null;
    }

    public boolean checkEval5() {
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        boolean method1Checker = false;
        for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
            if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
            if (!(super.introspector.getParameterCount(method1) == 0)) continue;
            method1Checker = true;
            break;
        }
        if (method1Checker == false) return false;
        return true;
    }

    public boolean solveEval5() {
        final Class[] classs1 = {  };
        final Class class1 = super.introspector.getClass("Circulo");
        if (class1 == null) return false;
        super.intercessor.copyMethod(class1, "numeroCirculos", classs1);
        return true;
    }

    public String[] testEval5() {
        if (!(super.tester.executeTestCase("TestCases", "test01").equals(true))) return new String[] { "TestCases", "test01" };
        return null;
    }

    public boolean checkEval6() {
        final Class class1 = super.introspector.getClass("Cilindro");
        if (class1 == null) return false;
        boolean method1Checker = false;
        for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
            if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
            if (!(super.introspector.getParameterCount(method1) == 0)) continue;
            method1Checker = true;
            break;
        }
        if (method1Checker == false) return false;
        return true;
    }

    public boolean solveEval6() {
        final Class[] classs1 = {  };
        final Class class1 = super.introspector.getClass("Cilindro");
        if (class1 == null) return false;
        super.intercessor.copyMethod(class1, "numeroCirculos", classs1);
        return true;
    }

    public String[] testEval6() {
        if (!(super.tester.executeTestCase("TestCases", "test02").equals(true))) return new String[] { "TestCases", "test02" };
        return null;
    }

    public boolean checkEval3() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            final Class class2 = super.introspector.getClass("Circulo");
            if (class2 == null) continue;
            if (!(super.introspector.checkImplements(class2, class1) == true)) continue;
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public boolean solveEval3() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            final Class class2 = super.introspector.getClass("Circulo");
            if (class2 == null) continue;
            super.intercessor.addImplement(class2, class1);
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public String[] testEval3() {
        return null;
    }

    public boolean checkEval4() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            final Class class2 = super.introspector.getClass("Cilindro");
            if (class2 == null) continue;
            if (!(super.introspector.checkImplements(class2, class1) == true)) continue;
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public boolean solveEval4() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            final Class class2 = super.introspector.getClass("Cilindro");
            if (class2 == null) continue;
            super.intercessor.addImplement(class2, class1);
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public String[] testEval4() {
        return null;
    }

    public boolean checkEval7() {
        return true;
    }

    public boolean solveEval7() {
        return false;
    }

    public String[] testEval7() {
        return null;
    }

    public boolean checkEval13() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            final Class class2 = super.introspector.getClass("FiguraCon3Circulos");
            if (class2 == null) continue;
            if (!(super.introspector.checkImplements(class2, class1) == true)) continue;
            final Method method1 = super.introspector.getDeclaredMethods(class1)[0];
            final String method1Name = super.introspector.getName(method1);
            final Method method2 = super.introspector.getDeclaredMethods(class2)[0];
            final String method2Name = super.introspector.getName(method2);
            if (!method1Name.equals(method2Name)) continue;
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public boolean solveEval13() {
        boolean class1Checker = false;
        for (Class class1 : super.introspector.getClasses()) {
            if (!(super.introspector.isInterface(class1) == true)) continue;
            if (!(!super.introspector.getName(class1).equals("Volumen"))) continue;
            if (!(super.introspector.getDeclaredMethodCount(class1) == 1)) continue;
            boolean method1Checker = false;
            for (Method method1 : super.introspector.getDeclaredMethods(class1)) {
                if (!(super.introspector.checkReturnClass(method1, int.class, true) == true)) continue;
                if (!(super.introspector.getParameterCount(method1) == 0)) continue;
                method1Checker = true;
                break;
            }
            if (method1Checker == false) continue;
            final Class class2 = super.introspector.getClass("FiguraCon3Circulos");
            if (class2 == null) continue;
            super.intercessor.addImplement(class2, class1);
            final Method method1 = super.introspector.getDeclaredMethods(class1)[0];
            final String method1Name = super.introspector.getName(method1);
            final Method method2 = super.introspector.getDeclaredMethods(class2)[0];
            super.intercessor.setName(method2, method1Name);
            class1Checker = true;
            break;
        }
        if (class1Checker == false) return false;
        return true;
    }

    public String[] testEval13() {
        return null;
    }

    public boolean checkEval8() {
        final Class[] classs1 = {  };
        final Class class1 = super.introspector.getClass("GrupoFiguras");
        if (class1 == null) return false;
        final Method method1 = super.introspector.getDeclaredMethod(class1, "numeroCirculos", classs1);
        if (method1 == null) return false;
        return true;
    }

    public boolean solveEval8() {
        return false;
    }

    public String[] testEval8() {
        if (!(super.tester.executeTestCase("TestCases", "test03").equals(true))) return new String[] { "TestCases", "test03" };
        if (!(super.tester.executeTestCase("TestCases", "test04").equals(true))) return new String[] { "TestCases", "test04" };
        if (!(super.tester.executeTestCase("TestCases", "test05").equals(true))) return new String[] { "TestCases", "test05" };
        return null;
    }

    public boolean checkEval9() {
        final Class[] classs1 = {  };
        final Class class1 = super.introspector.getClass("GrupoFiguras");
        if (class1 == null) return false;
        final Method method1 = super.introspector.getDeclaredMethod(class1, "numeroCirculos", classs1);
        if (method1 == null) return false;
        return true;
    }

    public boolean solveEval9() {
        return false;
    }

    public String[] testEval9() {
        if (!(super.tester.executeTestCase("TestCases", "test06").equals(true))) return new String[] { "TestCases", "test06" };
        if (!(super.tester.executeTestCase("TestCases", "test07").equals(true))) return new String[] { "TestCases", "test07" };
        if (!(super.tester.executeTestCase("TestCases", "test08").equals(true))) return new String[] { "TestCases", "test08" };
        return null;
    }
}