Question: foodType ( ) ; foodType ( string , int, double, int, double, double ) ; private: string name; int calories; double fat; Int sugar; double
foodType ;
foodType string int, double, int, double, double ;
private:
string name;
int calories;
double fat;
Int sugar;
double carbohydrate;
;
double potassium;
variable declaration
foodType fruit;
foodType frutbanana;
a How many members does class foodType have?
Answer:
b How many private members does class foodType have?
Answer:
c How many constructors does class foodType have?
Answer:
d How many constant functions does class foodType have?
Answer:
e Which constructor is used to initialize the object fruit Which constructor is used to initialize the object fruit
fruit is initialized by
Fruit is initialized by
f Fill in the underlines below to rewrite the definition of the class foodType so that each data member can be set individually.
Answer:
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
