Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started