@Override
    public String removeTutor(String staffNum) {
        if (lookupTutor(staffNum) == null) {
            return "Tutor not found!\n";
        }
        tutorEntity = em.find(TutorEntity.class, lookupTutor(staffNum).getId());
        List<TutorialEntity> currTuts;
        Query q = em.createQuery("SELECT t FROM Tutorial t");
        currTuts = q.getResultList();
        if (currTuts.isEmpty()) {
            em.remove(tutorEntity);
            em.flush();
            em.clear();
            return "Tutor is successfully deleted\n";
        } else {
            for (TutorialEntity currTut : currTuts) {
                if (currTut.getTutor().getStaffNumber().equals(staffNum)) {
                    em.clear();
                    return "Tutor is associated with a tutorial, cannot be deleted!\n";
                }
            }
            em.merge(tutorEntity);
            em.remove(tutorEntity);
            em.flush();
            em.clear();
            return "Tutor is successfully deleted\n";
        }
    }