Question: A programmer has submitted the following class declaration for approval. This will be part of a program that tracks departments within a company and employees
A programmer has submitted the following class declaration for approval. This will be part of a program that tracks departments within a company and employees assigned to those departments.
@dataclass class Employee: An employee is a member of a department. Given a set of employees... if two or more employees work in the same department they will all reference ie share the same department. name: str identifier: int dept: Department salary: Dollars def worksinself Department: return self.dept def assigntoself aDept: Department pass public Employee getsupervisorself Employee return self.dept.supervisor
Based upon this information, which of the Python checklist items appear to be in violation?
Group of answer choices
Constructor initializes every data member
Interface completeness
Appropriate treatment of the clone method
Appropriate treatment of eq
Meaningful names
Undocumented preconditions
All data members private
Appropriate str function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
