Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the class Employee example provided in the tutorial, what code segment could be added to the _ _ init _ _ method to implement

For the class Employee example provided in the tutorial, what code segment could be added to the __init__ method to implement adding in the number of employees managed for employees with the job title "Manager" by asking the user for this number?
a.)
numManaged =0
if jobtitle == "Manager":
numManaged = int(input("Looks like you input a manager; how many employees does "+ firstname +" manage: "))
b.)
self.numManaged =0
if self.jobtitle == "Manager":
self.numManaged = int(input("Looks like you input a manager; how many employees does "+ self.firstname +" manage: "))
c.)
numManaged =0
if self.jobtitle == "Manager":
numManaged = int(input("Looks like you input a manager; how many employees does "+ firstname +" manage: "))
d.)
self.numManaged =0
if self.jobtitle == "Manager":
numManaged = int(input("Looks like you input a manager; how many employees does "+ self.firstname +" manage: "))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

6. How do histories influence the process of identity formation?

Answered: 1 week ago