Home Segments Index Top Previous Next

266: Practice

Define new for the Vegetable class, such that, whenever a new Vegetable is created, the fCalories instance variable is set to 1, a value that happens to approximate the fat calories found in one serving of a vegetable.