Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

//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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions