Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me with this in python You need to write an Employee class that maintains the information about the university employees. You need to

image text in transcribedplease help me with this in python

You need to write an Employee class that maintains the information about the university employees. You need to write your code in the given Employee class. It must contain the following: 1. There will be one static class variables emID (int). emID will be used to maintain the incremental employee id (initialized to 0 ). 2. The getNextEmpID method (a static method) will compute and return the incremental employee id. The returned employee id will be a string derived from emID in the format EMPXXXX, where XXXX is the incremental emID. Examples: This method will return EMP0001 for emID 1. This method will return EMP1000 for emID1000. 3. The decrementEmpID method (a static method) will decrement the current value of the class variable emID by 1 . 4. The class constructor will receive the first name and the last name of the employee and use them to create an instance of the class. In addition, the instance will store the incremental employee id generated using the getNextEmpID method. It will also initialize an empty department object list depLst. You will hide all four instance variables (make them private by adding the double underscore preceding the variable names). 5. There will be four accessor methods: get_emp_id, get_fName, get_lName, and get_depLst. These methods will return the employee id, first name, last name, and a list of department objects respectively. 6. There will be two mutator methods: set_fName and set_lName. Each of these methods receives a string and sets the first name and the last name respectively. 7. The add_dept receives a department object and adds it to the department object list depLst. 8. The _str_ method will print the Employee information as shown in the screenshots

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

Students also viewed these Databases questions

Question

9-13. What techniques are used to capture the readers attention?

Answered: 1 week ago

Question

=+4. Outline the major supporting points.

Answered: 1 week ago