Question: Correct the errors in the Item class shown in Figure 15-21. //declaration section class Item { private: item(); void assignItem (string, double); public: string name;

Correct the errors in the Item class shown in Figure 15-21. 

//declaration section class Item { private: item(); void assignItem (string, double); public: string name; double price; //implementation section Item() { name =

//declaration section class Item { private: item(); void assignItem (string, double); public: string name; double price; //implementation section Item() { name = "": price - 0.0; } //end of default constructor void assignItem(string n, double p) { name - n; price - p; %3D } //end of assignItem method Figure 15-21

Step by Step Solution

3.42 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Error will come in the Constru... View full answer

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 Microsoft Visual C# Introduction Questions!