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;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here