Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Heres the implementation of the program python class Employee def initself name titleTBD schoolUnkno... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Algorithms questions

Question

Explain and criticize the JamesLange theory of emotion.

Answered: 1 week ago

Question

List four characteristics of a data warehouse.

Answered: 1 week ago