basically i have two class (Customer, EmpClass), and i tried many times to find a way in witch one employee (object of EmpClass) can perform the functionalities that are available to the Customer Class's object,ex Deposit,withdraw and so on and off course on behalf of one customer, and later on time of enquiry i can tell which employee have perform what operations for a particular customer and like that . and thanks in advance :)
my models :
class Customer(object):
''' this class contains all Customer related Information and Functions'''
BankName = "SBH"
def __init__(self, Cname,CacountNumber, Cbalance):
self.Cname = Cname
self.CacountNumber = CacountNumber
self.Cbalance = Cbalance
def Deposit(self, DepositAmount):
self.Cbalance = self.Cbalance + DeposetAmount
def WithDraw(self, WithDrawAmount):
if WithDrawAmount > self.Cbalance:
raise InSuffetiantFunds
self.Cbalance = self.Cbalance - WithDrawAmount
def C_Info(self):
print "Bank Name :", Customer.BankName
print "Customer Name :", self.Cname
print "Customer Acount Number : ", self.CacountNumber
print "Customer Balance :", self.Cbalance
class EmpClass(Customer):
''' this class contains all Employee related Information and Functions'''
BankName = "SBH"
def __init__(self, EmpName,EmpId,):
self.EmpName = EmpName
self.EmpId = EmpId
Customer.__init__(self, Cname,CacountNumber, Cbalance)
def E_Info(self):
print "Bank Name :", EmpClass.BankName
print "Employee Name:", self.EmpName
print "Employee Id : ", self.EmpId