I have a “best practice” question. In this chapter, we created a new class called TrueFalse. We could have, of course, just created an array in QuizActivity without the class and created a couple functions and been done with it. However, here we chose to create a Class with getters and setters. I would like to make good decisions going forth on which approach to take.
I’d just like some feedback on when it is best to use one over the other. One reason I understand is reusability; another reason might be encapsulation. Are there other reasons? Are my two given reasons correct? Thanks in advance!