@Override
    public String removeStudent(String matricNum) {
        if (lookupStudent(matricNum) == null) {
            return "Student not found!\n";
        }
        studentEntity = em.find(StudentEntity.class, lookupStudent(matricNum).getId());
        modules = studentEntity.getModules();
        appeals = studentEntity.getAppeals();
        if (modules.isEmpty() && appeals.isEmpty()) {
            em.remove(studentEntity);
            em.flush();
            em.clear();
            return "Student is successfully deleted\n";
        } else {
            em.clear();
            return "Student is associated with a Module or Appeal, cannot be deleted!\n";
        }
    }