def __str__(self): hasGarageStr = "No Garage" if self._hasgarage: hasGarageStr = "Has Garage" return ("%s, %i bedrooms, %s" % (Property.__str__(self), self._numfloors, hasGarageStr))
def __str__(self): hasBalconyStr = "Has No Balcony" if self._hasBalcony: hasBalconyStr = "Has Balcony" return ("%s, AppartmentNo: %i, %s" % (Property.__str__(self), self._appartmentNo, hasBalconyStr))