Homework05 for CSCI 261 C++ programming homework