I was given a problem to solve:
A Book, which as a title, author, and year of publication. Include methods to get and set the private instance variables and a toString method to display the object. Also create a method moreRecent which takes two books as input parameters and returns the one that was published more recently. Create 3 JUnit tests for moreRecent.
I think the part about creating a method "moreRecent" is easy enough, but I don't get what the problem means by getting and setting the private instance variables and a tostring method to display the object. Does anybody know what it means and show me, because I am really confused. Thanks a lot!
Thanks, I believe I solved it.