Home Segments Index Top Previous Next

613: Practice

Define the Food class, with setters and getters, as shown in Segment 455. Next, file out the Food class to a file. Then, read the file using your favorite text editor, and replace the fCalories, cCalories, and pCalories variables with f, c, and p. Finally, exit from Smalltalk without saving the image, start Smalltalk again, file in the altered file, and examine the Food class using the class-hierarchy browser.