Skip to content

C# quick start for the Nurses coding challenge, for use in pairing interviews.

Notifications You must be signed in to change notification settings

cogent/nurses_scaffold_csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nurses Rostering

Challenge

You just started work for a startup that sells medical rostering software. They’ve just landed a new client, a major hospital, and everyone’s excited! However, the HR policies at the hospital are too complex for the software to handle.

At the hospital nurses work a rotating shift system. There are three work shifts per day; a morning shift, an evening shift and a night shift. Each day, all three shifts need to be filled.

Your task is to develop a rostering system that implements the following policies:

  • Five nurses need to be on staff for each shift.
  • Nurses must not be expected to work more than one shift per day.

The rostering system should calculate and output the nursing roster for any time period (specified by a start and end date).

A list of rosterable nurses has been provided in the file spec/sample_data/nurses.csv.

Scaffold Code

Some code has already been provided to help save you time. This focusses on the following areas.

  1. Providing a command line interface so that this app can be called with parameters and provide help information.
  2. Handling of input and output, such as parsing a file of nurses, and formatting the resulting roster to text, for printing to standard out.
  3. A few basic data classes such as Roster and Nurse, mainly provided so that the input and output handling code has something to work with.

You're welcome to change any of this code if you like, but the goal is to save you time so you can show us how you'd like to solve the interesting parts of this problem, not spend your time formatting strings for output.

Development

prerequisites

check that you have it installed with

$ dotnet --list-sdks

run the app

The application is intended to be used as a command line interface (CLI) tool. You can invoke it with the dotnet CLI.

$ cd Nurses

$ dotnet run --start 2020-04-10 --end 2020-05-10 --input-file ../Nurses.Tests/SampleData/nurses.csv

# or, run it from the root of the repository by specifying the Nurses project using the --project flag

$ dotnet run --project Nurses --start 2020-04-10 --end 2020-05-10 --input-file Nurses.Tests/SampleData/nurses.csv

run the tests

$ dotnet test

About

C# quick start for the Nurses coding challenge, for use in pairing interviews.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages