homework 3 of oop