Skip to content

winestock/Babysitter-Kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Babysitter-Kata

My implementation of the Babysitter Kata: https://gist.github.com/jameskbride/5482722

Babysitter Kata

Background

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:00 PM
  • leaves no later than 4:00 AM
  • 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)

Feature:

As a babysitter In order to get paid for 1 night of work I want to calculate my nightly charge.

Update:

Note that the original requirements do not mention when bedtime is supposed to be. This, I imagine, is set by the parents rather than left to the babysitter. Since children who need babysitting are very young, I'll set the bedtime to something early: 8:00 PM.

About

My implementation of the Babysitter Kata: https://gist.github.com/jameskbride/5482722

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published