Question: Given the following class, what would be the best declaration for a constructor that would allow the user to initialize the object with an

Given the following class, what would be the best declaration for a 

Given the following class, what would be the best declaration for a constructor that would allow the user to initialize the object with an initial age and cost? class Wine { }; public: Wine(); int getAge(); float getCost (); private: int age; float cost; Select one: a. int getAge(int newAge); b. Wine (int newAge, float newCost); C. Wine(int age); d. Wine();

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 Computer Network Questions!