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...


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;



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here