My question is poorly worded and I apologies for that. I was not to sure how to ask this question.
I have been learning java for almost a year now and can do everything I want to at this point. However I am stuck on a few things in terms of how to correctly do them.
One of my classes named teacher has a method as below:
There is currently no need for the other methods as my question is about the way I code. I create two suspects and present them to the player.
Whilst doing my unit testing I noticed that testing the chooseWhoDidIt() method to test if the suspects information were correctly pulled from the database just felt wrong. I feel like I should have a separate method that deals with the creation of the suspects.
That brings me to my second question. If I do make a second method that creates suspects, would it make sense to even have that method in the Teacher class?
I am more then happy to recieve any other input to help me better my practises. That is what I would like to focus on for the new few weeks/months.
Thank you all!
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!