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

 Lesson Classes implement the following program: 1) Define a class Employee

Lesson Classes 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 Course = 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

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!