#PLEASE DO NOT EDIT THIS CODE
#This code was generated using the UMPLE 1.38.0.8942.247e17422 modeling language!
class Person:
def __init__(self, aName, aId, aAge):
self._cachedHashCode = None
self._canSetId = True
self._canSetName = True
self._name = aName
self._id = aId
self._age = aAge
def setName(self, aName):
if not self._canSetName:
return False
self._name = aName
return True
def setId(self, aId):
if not self._canSetId:
return False
self._id = aId
return True
def setAge(self, aAge):
self._age = aAge
return True
def getName(self):
return self._name
def getId(self):
return self._id
def getAge(self):
return self._age
def __eq__(self, obj):
if type(obj) is not type(self):
return NotImplemented
return (self.getId(), self.getName()) == (obj.getId(), obj.getName())
def __hash__(self):
if self._cachedHashCode is None:
self._cachedHashCode = hash((self.getId(), self.getName()))
self._canSetId = False
self._canSetName = False
return self._cachedHashCode
def equals(self, obj):
return self == obj
def delete(self):
pass
def __str__(self):
return (super().__str__() + "["
+ "id:" + str(self.getId()) + ","
+ "name:" + str(self.getName()) + ","
+ "age:" + str(self.getAge())
+ "]")
#PLEASE DO NOT EDIT THIS CODE
#This code was generated using the UMPLE 1.38.0.8942.247e17422 modeling language!
from example.Person import Person
class Mentor(Person):
def __init__(self, aName, aId, aAge, aClass):
self._class = aClass
super().__init__(aName, aId, aAge)
def setClass(self, aClass):
self._class = aClass
return True
def getClass(self):
return self._class
def delete(self):
super().delete()
def __str__(self):
return (super().__str__() + "["
+ "class:" + str(self.getClass())
+ "]")