Question: Presented here is a class definition for the item class. There are two constructors, a default constructor and a custom constructor. Write the function definition

Presented here is a class definition for the item class. There are two constructors, a default constructor and a custom constructor. Write the function definition for both constructors. (5 min-10points)
class Item
{
public:
// Initializes name to "item" and price to 0.
Item();
// Initializes values based on provided arguments.
Item(string n, double p);
void inputItem();
void outputItem();
private:
string name;
double price;
};
 Presented here is a class definition for the item class. There

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 Databases Questions!