At DiUS we need all the help we can get remembering things. To help, you need to code up a simple To Do list.
The features on this system are:
- The "To Do" list contains items
- Items have a string (the thing "To Do") and a completion date. The date is the date the item needs to be completed by
- Items that contain an empty or null string should be rejected
- Items can be retrieved by index, that is the order in which they were inserted. So 0 returns the first inserted item, etc.
- Items can be retrieved by day, so give me all the items that need to be done on the 24th of April, 2014
- Items can be marked as done. Any items that are complete should not be returned
- Only add the minimal required validation
Here's a sample interface in Java
todoList.add(item);
todoList.getItemsThatNeedToBeCompletedBy(date);
todoList.getItem(0);
todoList.getItem(1);
- Make the item accept any type not just a string. It is acceptable for lists to only store one type of item though. So a list of strings, or a list of numbers
Notes on implementation:
- use Java, Javascript, Groovy, Scala, Ruby or C#
- try not to spend more than 2 hours maximum. (We don't want you to lose a weekend over this!)
- don't build guis, a command line interface etc, we're more interested in your approach to solving the given task, not how shiny it looks.
- don't use any frameworks (rails, spring etc), or any external jars/gems (unless it's for testing..)
- do not change the interface
When you've finished, zip up the solution and send it to [email protected]. Happy coding :)