Question: File: test_company.py This is the test program for assignment 4. from company import Employee, Customer customer1 = Customer(Drew Smith,

Program: company.py This program exercises many of the things we covered inthis week's material including operator overloading and inheritance. Requirements For this assignmentyou have been provided a base class named Person contained in thefile person.py and a test program named test_company.py. For the assignment you
"""    File: test_company.py    This is the test program for assignment 4.    """        from company import Employee, Customer        customer1 = Customer("Drew Smith", \                       "285 Andover Lane, Pompano Beach, FL, 33060", \                       "412-555-2121", \                       760)        employees = []    employees.append(Employee("James Chen", \                       "87 Pierce Road, Windsor, CT, 06095", \                       "256-555-3331", \                       907, \                       75000)                     )        employees.append(Employee("Brady Parker", \                       "80 Franklin Dr., Waterbury, CT, 06705", \                       "756-555-3828", \                       321, \                       90000)                     )        print("Customers: \n")    print(customer1, "\n")        print("Employees: \n")    for employee in employees:        print(employee, "\n")        for employee in employees:        if (employee == employees[1]):            print("I found the employee with badge", employee.get_badge())                                                 class Person(object):        """ Defines information for a person """                def __init__(self, name, address, phone):            self.name = name            self.address = address            self.phone = phone            def set_address(self, address):            self.address = address            def get_address(self):            return self.address                def set_phone(self, phone):            self.phone = phone            def get_phone(self):            return self.phone            def get_name(self):            return self.name            def __str__(self):            return "Name: " + self.name + \                   "\nAddress: " + self.address + \                   "\nPhone: " + self.phone

Program: company.py This program exercises many of the things we covered in this week's material including operator overloading and inheritance. Requirements For this assignment you have been provided a base class named Person contained in the file person.py and a test program named test_company.py. For the assignment you are to create a Python module named company.py that does the following: 1. The module should import the Person class from person.py 2. The module should define two classes, Employee and Customer. Each class should be derived from the Person class so it inherits a person's attributes and methods. 3. The Customer class should additionally: a. Have an instance variable named credit_score, along with accessor ("getter") and mutator ("setter") methods to read and set the credit score.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!