Here's a response to the coding challenge on Iotum's website.
The goal was to come up with a function that returns an appropriate result when a player guesses a location on a battleship board.
The applet at right provides a testing environment for the function, which is called when a user clicks on one of the squares of the board. The result of each click is displayed at the bottom of the board.
Note: The first few hits on a ship are displayed as green squares, then the whole ship turns red when you've sunk it.
A suite of JUnit tests is included with the source for the applet.