I have this code:
class Member:
def __init__(self, name, typeOM, fee, yearJoin):
self.name = name
self.typeOM = typeOM
self.fee = float(fee)
self.yearJoin = yearJoin
# Reader Methods
def getName(self):
return self.name
def getTypeOM(self):
return self.typeOM
def getFee(self):
return self.fee
def getYearJoin(self):
return self.yearJoin
def getMemberTypeString(self):
if self.typeOM == 'P' or self.typeOM == 'p':
return "Playing"
else:
return "Social"
# Writter Methods
def setName(self, nameIn):
self.name = nameIn
def setTypeOM(self, typeOMIn):
self.typeOM = typeOMIn
def setYearJoin(self, yearJoinIn):
self.yearJoin = yearJoinIn
# toString method
def __str__(self):
return "%s (%s member) joined in %i" \
%(self.name, str(self.getMemberTypeString), self.yearJoin)
The getMemberTypeString method is supposed to determine from the typeOM the type of member then print the appropriate string, but i keep getting a memory address reference(at least thats what i think it is), what am i doing wrong??
Here's what i get:
Mark (<bound method Member.getMemberTypeString of <__main__.Member instance at 0xb662044c>> member) joined in 1989