Software development has 6 distinct stages:
1) Planning
2) Analysis
3) Design
4) Coding
5) Testing & debugging
6) Maintenance
Any stage can reveal problems with previous work, and cause earlier stages to be revisited and changed - making it necessary to re-work all the later stages. So for example the coding stage can reveal problems in the database design, which means that the analysis stage has to be revisited, which affects the design of the software, and also means changes to existing code.
As a student, stages 1 and 2 are done by your teacher, stage 3 is generally forgotten about altogether in the rush to start coding, and you have reached the start of stage 5: testing and debugging.
This is where you prepare test data to check if your code works and to ensure that it matches the specification produced at the end of stage 2 - the homework question.
So start testing your code: provide it with inputs and decide what it should do in response: what answers it should produce. These should be "good data" and "bad data" to make certain teat it responds well to errors, as well as processes properly.
If it fails the tests, use the debugger to work out why, and revisit the coding stage to make changes in response. Then it's back to testign and debugging, until it passes all your tests and is ready for release (handing in to your teacher).
This is part of your task, (it's part of all our jobs!) so get used to it: read your question carefully, work out some test data to feed it, and try it out to see how well it complies.
That's not my job, even if I had more than your vague description of what should happen!