Write a class CustomerAccount that stores the account number, name, address, interest rate and balance. Include the Constructor, Accessor, and Mutator methods.
1
Expert's answer
2011-05-23T10:33:38-0400
# The implementation of the class CustomerAccount class CustomerAccount:
# The Constructor def __init__(self, number, name, address, rate, balance): & self.__number = number & self.__name = name & self.__address = address & self.__rate = rate & self.__balance = balance
# The Accessor methods def GetNumber(self): & return self.__number
def GetName(self): & return self.__name
def GetAddress(self): & return self.__address
def GetRate(self): & return self.__rate
def GetBalance(self): & return self.__balance
# The Mutator methods def SetNumber(self, number): & self.__number = number
Comments
Leave a comment