Lab2: Finish Exercise 8. Modify the error method, make error() method  could  detected all the errors
Lab2: Exercise 9: emit warning messages, but it only coult to the unused variable in one method
my solution to lab2