Skip to content

JonKruger/employee-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a system for an HR department that can run payroll in order to pay employees. Employees are paid differently depending on the type of employee.

  • Salaried employee – pay the employee their hourly rate for the all hours worked up to the number of hours in the pay period. (The employee’s hourly rate can be calculated by dividing their annual salary by 2080.)
  • Hourly employee – pay the employee their hourly rate for the all hours worked up to the number of hours in the pay period for all hours worked. Pay the employee time and a half (1.5 x their hourly rate) for all hours worked above the number of hours in the pay period.

Your program will be given:

  • Pay rate (salary for salaried employees, hourly rate for hourly employees)
  • Employee type (“salary” or “hourly”)
  • Number of hours the employee worked in the pay period
  • Number of hours in the pay period (e.g. standard work week = 40 hours)

Calculate:

  • Pay for the pay period

About

Employee kata from TDD talk at CodeMash (my implementation of it)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages