Implemented programming assignment 2 for rprog-002.