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 = "": 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
Error will come in the Constru... View full answer
Get step-by-step solutions from verified subject matter experts
