Home Segments Index Top Previous Next

273: Mainline

Thus, if you use setters and getters, you need to make no changes outside the setters and getters to accommodate a switch from calorie-based instance variables to gram-based instance variables. Both before and after the switch, you still send fCalories, cCalories, and pCalories messages.