Manage your workplace employees
Project description
Learning about Python Classes
Employee System
Classes:
Employee
- Must pass in First Name (str), Last Name (str), Salary (int)
- When printed, outputs all of its information
- When casted into a string, the salary is used
- Has a 'Raise Amount' of 5%
- Can be added to the employee's salary by using the .apply_raise() method
-
- Can be directly modified by assigning an integer value to the class variable
-
- Ex: x.raiseAmt = 2 <--Directly modifies the class variable, applying it to all instances
Manager
- Must pass in First Name (str), Last Name (str), Salary (int), and the employees under their management (list)
- When printed, outputs all of its information
- When casted into a string, the salary is used
- Has a 'Raise Amount' of 10%
-
- Can be added to the employee's salary by using the .apply_raise() method
- Employees under the manager's management can be added
-
- Use the .add_employee() method
- Employees under the manager's management can be removed
-
- Use the .remove_employee() method
- Check if it is a workday by using the is_workday(int) method
-
- Day of the week as an integer must be passed in where 1 = Monday and 7 = Sunday
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
employeesystem-1.0.3.tar.gz
(1.6 kB
view details)
File details
Details for the file employeesystem-1.0.3.tar.gz.
File metadata
- Download URL: employeesystem-1.0.3.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fbb983e8a8f9e3f8755db45529e1c1b42ef074696bd8a7c1013960ce558a6c5
|
|
| MD5 |
e07062fe4784b311f6cd95a3ae71fb09
|
|
| BLAKE2b-256 |
f6558a1a0ae6d22833e8c241dd2cb719f4d6ea79b57ee24d2d6386e6b684a796
|