Move Exercise 3 code to Ex_3 object.