assignment 3. Print method.