Skip to content

Instantly share code, notes, and snippets.

Forked from jameskbride/babysitter_kata
Created November 14, 2018 18:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Babysitter Kata
Babysitter Kata
This kata simulates a babysitter working and getting paid for one night. The rules are pretty straight forward:
The babysitter
- starts no earlier than 5:00PM
- leaves no later than 4:00AM
- gets paid $12/hour from start-time to bedtime
- gets paid $8/hour from bedtime to midnight
- gets paid $16/hour from midnight to end of job
- gets paid for full hours (no fractional hours)
As a babysitter
In order to get paid for 1 night of work
I want to calculate my nightly charge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment