We don't do homework but don't mind helping out. What have you got so far and where are you stuck?
If posting code please use code tags to retain formatting.