Question: Given main ( ) , complete the FoodItem class ( in file FoodItem.java ) with constructors to initialize each food item. The default constructor should
Given main complete the FoodItem class in file FoodItem.java with constructors to initialize each food item. The default constructor should initialize the name to "Water" and all other fields to The second constructor should have four parameters food name, grams of fat, grams of carbohydrates, and grams of protein and should assign each private field with the appropriate parameter value.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
