i don't have time to (do your homework) presently. however: there are some on this site who help with those things (me if rarely).
my advice is learn how to post the code* and someone will be allot more likely to help you.
(use the little icon top left in the editing window to post your code neatly instead of attaching a .nb, also read the site rules / suggestings for posting on the site which tells you about doing the same)