Help! I need to do this in Python 8 – Create a class that represents an employee, recording his name, salary and date of admission. In then create a class that represents a department of a company, registering the name and the employees working on it (for vector usage, consider a maximum of 100 employees). Finally, create a class that represents a company, registering its name, CNPJ and departments (consider a maximum of 10 departments). Make a program that: - Create a company; - Add some departments to this company; - Give 10% increase to all employees in a given department; - Transfer an employee from one department to another. Your code is expected to be well encapsulated. For example, to add a department in a company (or an employee to a department), you should not access the vector (or list) of departments directly, but rather have a method in the class that represents the company to add a department.
Help! I need to do this in Python
8 – Create a class that represents an employee, recording his name, salary and date of admission. In then create a class that represents a department of a company, registering the name and the employees working on it (for
Finally, create a class that represents a company, registering its name, CNPJ and departments (consider a maximum of 10 departments).
Make a program that:
- Create a company;
- Add some departments to this company;
- Give 10% increase to all employees in a given department;
- Transfer an employee from one department to another.
Your code is expected to be well encapsulated. For example, to add a department in a company (or an employee to a department), you should not access the vector (or list) of departments directly, but rather have a method in the class that represents the company to add a department.
Step by step
Solved in 4 steps with 2 images