in reply to Stuck with hw

Haha, well at least you admit it's homework, and you've included some code of your own. We get a lot of homework questions here from people trying to get us to do their whole assignment for them.

We can probably give you some advice, but first you'll have to make your post readable.