End of Class Test Question#3

Hi All, below is my solution for problem no 3. Would anyone be able to verify if I am doing this correct. If not could you please kindly post the correct solution.

Question #3:

My Solution: