Santiago Serrano2,754 Points
Shouldn't we have used the setFinalPage setter instead of changing the field directly in the constructor?
Aren't getters and setters precisely for this? If we had to change something or perform another action when we changed our field (isFinalPage) we would have to update both the constructor and the setter.
alastair cooper25,422 Points
The setter is a public function used for access from outside the class. As this will always be the final page, it is best to set it in the constructor when the object is instantiated so that any calls to the getter will return the desired result. A better question would be 'why did we create the setter in the first place?' as we don't ever want this value to change (unless I am jumping the gun here and we will indeed use it later in the course!)