My program is suppose to create a class named Empoyee that holds the following data about an empoyee in attributes: name, id number, department, & job title. Second, create 3 objects to hold specified data. Finally, the program should store/display the specified data in the 3 objects.
I am receiving the following Traceback error:
TypeError: ‘str’ object is not callable
I provided an attached .txt file with the whole code, but the following is where the error is occurring:
class Employee:
def init(self, name, idNumber, department, jobTitle):
self.name = name
self.idNumber = idNumber
self.department = department
self.jobTitle = jobTitle
def employee_1_information(self, name, idNumber, department, jobTitle):
self.name = name
self.idNumber = idNumber
self.department = department
self.jobTitle = jobTitle
return self.name, self.idNumber, self.department, self.jobTitle
def employee_2_information(self, name, idNumber, department, jobTitle):
self.name = name
self.idNumber = idNumber
self.department = department
self.jobTitle = jobTitle
return self.name, self.idNumber, self.department, self.jobTitle
def employee_3_information(self, name, idNumber, department, jobTitle):
self.name = name
self.idNumber = idNumber
self.department = department
self.jobTitle = jobTitle
return self.name, self.idNumber, self.department, self.jobTitle
def main():
name = “Susan Meyers”
idNumber = “47899”
department = “Accounting”
jobTitle = “Vice President”
employeeData1 = Employee(name, idNumber, department, jobTitle)
employeeData1.name(name)
employeeData1.idNumber(idNumber)
employeeData1.department(department)
employeeData1.jobTitle(jobTitle)