// Mass class implementation // -------------------------- // To allow this class to be used independently, funtions that // interact with other physical quantity classes are not defined // here. See Newton.cpp for some of them. #include "global.hpp" #include "Mass.hpp" Mass& Mass::operator+=(MASS rs) {value+=rs.value; return *this;} Mass& Mass::operator-=(MASS rs) {value-=rs.value; return *this;} Mass& Mass::operator*=(DOUBLE rs) {value*=rs; return *this;} Mass& Mass::operator/=(DOUBLE rs) {value/=rs; return *this;} ostream& operator<<(ostream& ls, MASS rs) {return ls << rs.grams() << " grams";}