Mr. Stride at NCHS does a quick demonstration of getters & setters in the Point class. He will add an instance field for the distance to the origin and shows how setters allow the Point class to assure that this instance field is correctly updated when the position of the point is changed.
0 Comments