Assignment 4 Prob 5

Updated class for register