It is interesting to apply our ideas to finding optimal paths through rectangular obstacle arrays. We add a GenerateObstacleArray() and ReadObstacleArray() method to the DP class as follows: