Homework assignment 2 for MCS 270 coding section