public void executeTask() {

        Validator valid = new Validator();
        List<String> invalidValues = null;
        if (isModifyAction()) {
        } else {

            String COURSE_TYPE = getSelectedCourse().getType();
            if(getSelectedStudentRegisteredCourse()==null){
                showError("To submit marks, please select a valid Course","No Course Selected");
                return;
            }
            StudentRegisteredCourse c =getSelectedStudentRegisteredCourse();
            switch (COURSE_TYPE) {
                case CORE_COURSE: {
                    c.setAssignment_1_Marks(getAssignment1());
                    c.setAssignment_2_Marks(getAssignment2());
                    c.setAssignment_3_Marks(getAssignment3());
                    c.setClassTestMarks(getClassTest());
                    c.setFinalExam(getFinalPaper());
                    c.setFinalPaperRepeatd(isFinalPaperRepeated());

                    invalidValues = valid.validateIncludes(c, "getAssignment_1_Marks", "getAssignment_2_Marks", "getAssignment_3_Marks",
                            "getClassTestMarks", "getFinalExam");

                }
                break;

                case CORE_COURSE_WITH_PRACTICAL: {
                    c.setAssignment_1_Marks(getAssignment1());
                    c.setAssignment_2_Marks(getAssignment2());
                    c.setAssignment_3_Marks(getAssignment3());
                    c.setClassTestMarks(getClassTest());
                    c.setPracticalTest(getPracticalTest());
                    c.setFinalExam(getFinalPaper());
                    c.setPracticalTestRepeated(isPracticalTestRepeated());
                    c.setFinalPaperRepeatd(isFinalPaperRepeated());
                    invalidValues = valid.validateIncludes(c, "getAssignment_1_Marks", "getAssignment_2_Marks",
                            "getClassTestMarks", "setPracticalTest", "setFinalExam");
                }
                break;

                case OPTIONAL_COURSE: {
                    c.setAssignment_1_Marks(getAssignment1());
                    c.setAssignment_2_Marks(getAssignment2());
                    c.setClassTestMarks(getClassTest());
                    c.setFinalExam(getFinalPaper());
                    c.setFinalPaperRepeatd(isFinalPaperRepeated());
                    invalidValues = valid.validateIncludes(c, "getAssignment_1_Marks", "getAssignment_2_Marks",
                            "getClassTestMarks", "setFinalExam");
                }
                break;

                case OPTIONAL_COURSE_WITH_PRACTICAL: {
                    c.setAssignment_1_Marks(getAssignment1());
                    c.setAssignment_2_Marks(getAssignment2());
                    c.setClassTestMarks(getClassTest());
                    c.setPracticalTest(getPracticalTest());
                    c.setFinalExam(getFinalPaper());
                    c.setPracticalTestRepeated(isPracticalTestRepeated());
                    c.setFinalPaperRepeatd(isFinalPaperRepeated());
                    invalidValues = valid.validateIncludes(c, "getAssignment_1_Marks", "getAssignment_2_Marks",
                            "getClassTestMarks", "setFinalExam", "setPracticalTest");
                }
                break;

                case PROJECT: {
                    c.setInterimReportMarks(getInterimReport());
                    c.setInterimPresentationMarks(getInterimPresentation());
                    c.setFinalReport(getFinalReport());
                    c.setFinalPresentation(getFinalPresentation());
                    c.setFinalProduct(getFinalProject());

                    c.setIntReportRepeat(isInterimReportReported());
                    c.setIntPresentRepeat(isInterimPresentationRepeated());
                    c.setFinalReportRepeat(isFinalReportRepeated());
                    c.setFinalPresentRepeat(isFinalPresentationReported());
                    c.setFinalProjectRepeat(isFinalProjectRepeated());

                    invalidValues = valid.validateIncludes(c, "getInterimReportMarks", "getInterimPresentationMarks",
                            "getFinalReport", "getFinalPresentation", "getFinalProduct");
                }
                break;

            }
            if (!invalidValues.isEmpty()) {
                String invParams = "";
                for (String params : invalidValues) {
                    invParams += params + "\n";
                }
                showError("Fill All Fields", "Please fill followings \n" + invParams);
                return;
            }
            boolean isSuccess = dao.saveMarks(c);

        }

    }