An overloaded subtraction operator subtracts two Shipment objects from each other, returning an integer that represents the difference in their totalWeight variables. The subtraction operator works as expected, with the object to the right of the minus sign being subtracted from the object to the left. The function header is int Shipment::operator-(Shipment ship). Within the function, which of the following is correct?
a. int difference = ship – totalWeight;
b. int difference = totalWeight – ship;
c. int difference = ship.totalWeight – totalWeight;
d. int difference = totalWeight – ship.totalWeight;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.