hi error909, it's quite clear you're asking us to do an assignment for you. Unfortunately for you, we cannot do this, as it would go against this site's policy, as stated here:
http://bytes.com/faq.php?faq=posting..._or_coursework
We can however, help you with it, so if you would give it a try yourself, and post the code here, the people on this site will point you to the errors, and tell you what you have done wrong and why it is wrong.
When you're posting code, you can put it between code tags ([code] at the start, and [/code] at the end), that way the code will appear in a way it is easier for everyone to read.