Esempio n. 1
0
 def isEqualTo(self, obj):
     """check if obj is equal to this Teacher"""
     if isinstance(obj, Teacher):
         if (requiredFieldIsGood(self.first, obj.first) and 
                 requiredFieldIsGood(self.last, obj.last) and
                 optionalFieldIsGood(self.address, obj.address) and
                 optionalFieldIsGood(self.city, obj.city) and
                 optionalFieldIsGood(self.postal, obj.postal) and
                 optionalFieldIsGood(self.daytimePhone, obj.daytimePhone) and
                 optionalFieldIsGood(self.eveningPhone, obj.eveningPhone) and
                 requiredFieldIsGood(self.email, obj.email)):
             return True
         else:
             return False
     else:
         return False
Esempio n. 2
0
 def isEqualTo(self, obj):
     """check if obj is equal to this Entry (test purposes only?)"""
     if isinstance(obj, Entry):
         if (requiredFieldIsGood(self.participantID, obj.participantID) and 
                 requiredFieldIsGood(self.teacherID, obj.teacherID) and
                 requiredFieldIsGood(self.discipline, obj.discipline) and
                 optionalFieldIsGood(self.level, obj.level) and
                 optionalFieldIsGood(self.yearsOfInstruction, obj.yearsOfInstruction) and
                 requiredFieldIsGood(self.classNumber, obj.classNumber) and
                 requiredFieldIsGood(self.className, obj.className) and
                 optionalFieldIsGood(self.instrument, obj.instrument)):
             return True
         else:
             return False
     else:
         return False
Esempio n. 3
0
 def isEqualTo(self, obj):
     """check if obj is equal to this SoloParticipant"""
     if isinstance(obj, Participant):
         if (requiredFieldIsGood(self.first, obj.first) and
                 requiredFieldIsGood(self.last, obj.last) and
                 optionalFieldIsGood(self.address, obj.address) and
                 optionalFieldIsGood(self.city, obj.city) and
                 optionalFieldIsGood(self.postal, obj.postal) and
                 optionalFieldIsGood(self.home, obj.home) and
                 optionalFieldIsGood(self.cell, obj.cell) and
                 optionalFieldIsGood(self.email, obj.email) and
                 requiredFieldIsGood(self.dob, obj.dob) and
                 optionalFieldIsGood(self.schoolAttending, obj.schoolAttending) and
                 optionalFieldIsGood(self.parent, obj.parent)):
             return True
         else:
             return False
     else:
         return False
Esempio n. 4
0
 def isEqualTo(self, obj):
     """check if obj is equal to this GroupParticipant"""
     if isinstance(obj, GroupParticipant):
         if (requiredFieldIsGood(self.groupName, obj.groupName) and
                 optionalFieldIsGood(self.groupSize, obj.groupSize) and
                 optionalFieldIsGood(self.schoolGrade, obj.schoolGrade) and
                 optionalFieldIsGood(self.averageAge, obj.averageAge) and
                 optionalFieldIsGood(self.participants, obj.participants) and
                 optionalFieldIsGood(self.contact, obj.contact)):
             return True
         else:
             return False
     else:
         return False