Finished code

For rprog-005 programming assignment #2