Home Segments Index Top Previous Next

342: Mainline

Ordinarily, class variables are initialized by class methods. For example, the class variables of the Food class can be initialized as follows:

Food method definition • class 
initializeClassVariables 
  FatRatio := 9. 
  CarbohydrateRatio := 4. 
  ProteinRatio := 4