Hello and welcome to the Monastery!
To begin, let me point you to a response to a similar thread that looks relevant. (Go ahead, it's a quick read and it'll help. Come back when you're finished.)
Since it's homework, you'll need to do the lion's share in figuring it out. If you get stuck, post specific details about what you tried (e.g. the code), what you expected, what you saw, and what confuses you.
If this is your first programming class, think about the problems you need to solve, put them in order, and then try to solve each in sequence. This particular assignment looks like a traditional top-down approach would be helpful.
We're generally happy to clarify things that don't make sense, but we do expect everyone to do their own homework (which includes basic research).
Marto has given you some good links to help you get started. See where they take you and, if you need to, ask follow-up questions...preferably with code.