Hackerrank Oops Practice Question