Since this is obviously homework or an assignment, I think you should at least try to solve problem yourself first. If you get stuck with a problem or error, please post the code you've written and we'll be glad to help.