Question: Write a function that overloads the + = operator for the Product class. The function should accept an int as its argument. The function should

Write a function that overloads the += operator for the Product class. The function should accept an int as its argument. The function should add the int value to the quantityInStock attribute of the Product object. Make sure the function returns the this pointer.
Assume that the function has already been declared in the Product class with the following statement:
Product *operator +=(int);

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