Question: preferred python: Job worker (object): def __init__(self, name, area): # Do coding here: create two local instance attributes and set them to the assigned parameters.

preferred python: 
Job worker (object): def __init__(self, name, area): # Do coding here: create two local instance attributes and set them to the assigned parameters. def info(self): """ DO: Prints the info of this worker :return: " works in the  area" i.e Simon works in the electric area """ return None """ Area Job is provided. Create three Job methods as follows: 1. set_name() to define the name of the area, 2. add_worker() to add an worker to the area. 3. worker() to return all the workers working in such area """ class area(object): def __init__(self, name=None): self.worker = [] # list of workers objects from upper part. self.name = name def set_name(self, name): """ Defines the area name :param name: :return: VOID """ # DO THE CODING HERE PLEASE pass def add_worker(self, worker_name): """ Adds an worker to this area :param worker_name: :return: VOID """ #DO: create a worker object #DO: add the worker object to the self.worker list. pass def list_of_workers(self): """ :return: the list of workers working in this area. """ #DO: return the self.worker list return None print(' ') " Inheritance ==>>" """ Job boss inherits data from job worker. The boss job has a private method that provides a random id, and a public method that shows all the info about that worker and its boss id. """ job boss(worker): def __init__(self, boss_id, name, area): worker.__init__(self, name, area) self.bossID = boss_id def boss_info(self): """ DO: Creates the boss info which name and area name is inhereted from the worker job. :return:  " with boss id: "  i.e simon works in the electric area with boss id: 4530" """ return None

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 Databases Questions!