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
Get step-by-step solutions from verified subject matter experts
