Question: K Implement the following program: 1) Define a class Employee with three string attributes name, title, school. 2) Define an init method/function for Employee

K Implement the following program: 1) Define a class Employee with three string attributes name, title, school. 2) Define an init method/function for Employee which sets the attribute values via input parameters. The default values for Title and School are "TBD" and "Unknown" respectively. 3) Define a print method/function that prints all attributes of Employee. 4) Define a class Course with a parent class of Employee with three attributes: string Dept, string Course Number and integer credits. 5) The Course Class has a Parent Class object of type Employee. 6) Define an init method/function for Course which sets the attribute values via input parameters. 7) Define a print method/function for Course which prints all attribute values of both the Parent Class Employee and Child Class of Course. 8) Create an instance of Employee with the values "Stephen Rose", "Professor" and "Queensborough". 9) Call the Employee print function. 10) Create an instance of Course with the values "James Bond", "Adjunct", "Queensborough", "ET","ET-574",4 11) Call the Course print function. Example Output Employee = Name: Stephen Rose Title: Professor School: Queensborough. : Jugtuc 00.00000 ODE Course = 008 00 Name: James Bond Title: Adjunct School: Queensborough Department: ET Course Number: ET-574 Credits: 4
Step by Step Solution
There are 3 Steps involved in it
Heres the implementation of the program python class Employee def initself name titleTBD schoolUnkno... View full answer
Get step-by-step solutions from verified subject matter experts
