Question: //Use this C++ code for the following questions class foodInfo { public: void set(string, string, int); void print() const; string getName() const; string getGroup() const;

//Use this C++ code for the following questions

class foodInfo { public: void set(string, string, int); void print() const; string getName() const; string getGroup() const; int getCalories() const; foodInfo(); foodInfo(string, string, int);

private: string name; string group; int calories; };

//How many members does class foodInfo have? //How many private members does class foodInfo have? //How many constructors does class foodInfo have? //How many constant functions does class foodInfo have? //Which constructor is used to initialize the object fruit1? Which constructor is used to initialize the object fruit2? //Fill in the underlines below to replace the definition of the constructors with a constructor with default parameter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!