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 (this mean no pay if arrive earlier than 5:00PM)
- leaves no later than 4:00AM (this mean no pay after 4am)
- gets paid $12/hour from start-time to bedtime (bedtime is constant 8pm)
- 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