I have a bad conscience, because I made your homework ;) But I hope you that you could learn something from my code samples. At least I hope that you going carefully through the code and do honestly understand how it works. Don't cheat yourself!
No, I'm going through and trying to understand what is happening. It's just hard to learn or write code when my professor doesn't exactly help or teach us certain code that we have to use