Question: Write a Python class called Person that contains name, age and gender as attributes. Derive a class called Employee from Person that adds an attribute

Write a Python class called Person that contains name, age and gender as attributes. Derive a class called Employee from Person that adds an attribute to store a personnel number. Derive a further class Executive from Employee. Each derived class should define a function that displays information about what it is. Example: Fred Smith is an Employee. Write a main program to generate a list of five executives and five ordinary employees and then display information about them.

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!