Skip to main content

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


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.1.1.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file employeesystem-1.1.1.tar.gz.

File metadata

  • Download URL: employeesystem-1.1.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for employeesystem-1.1.1.tar.gz
Algorithm Hash digest
SHA256 b0ead29deaa03ba2afd20baaafcfb25bf0b64d7078b20ad54e00fe1aab5ba5a5
MD5 5cb9eb7cf717ce15fb9cbc943eb42a33
BLAKE2b-256 516e2abd9b2e5f304b639ac9d0d1bc40946792e7257aac9b04cc9719f7fa6b9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page