#PLEASE DO NOT EDIT THIS CODE
#This code was generated using the UMPLE 1.38.0.8942.247e17422 modeling language!


class Mentor:
    def __init__(self):
        self._student = None

    def getStudent(self):
        return self._student

    def hasStudent(self):
        return self._student is not None

    def setStudent(self, aNewStudent):
        if aNewStudent is None:
            existingStudent = self._student
            self._student = None
            if existingStudent is not None and existingStudent.getMentor() is not None:
                existingStudent.setMentor(None)
            return True
        currentStudent = self._student
        if currentStudent is not None and currentStudent is not aNewStudent:
            currentStudent.setMentor(None)
        self._student = aNewStudent
        existingMentor = aNewStudent.getMentor()
        if existingMentor is not self:
            aNewStudent.setMentor(self)
        return True

    def delete(self):
        if self._student is not None:
            self._student.setMentor(None)

#PLEASE DO NOT EDIT THIS CODE
#This code was generated using the UMPLE 1.38.0.8942.247e17422 modeling language!


class Student:
    def __init__(self):
        self._mentor = None

    def getMentor(self):
        return self._mentor

    def hasMentor(self):
        return self._mentor is not None

    def setMentor(self, aNewMentor):
        if aNewMentor is None:
            existingMentor = self._mentor
            self._mentor = None
            if existingMentor is not None and existingMentor.getStudent() is not None:
                existingMentor.setStudent(None)
            return True
        currentMentor = self._mentor
        if currentMentor is not None and currentMentor is not aNewMentor:
            currentMentor.setStudent(None)
        self._mentor = aNewMentor
        existingStudent = aNewMentor.getStudent()
        if existingStudent is not self:
            aNewMentor.setStudent(self)
        return True

    def delete(self):
        if self._mentor is not None:
            self._mentor.setStudent(None)