Consider the following class implementation, which represents a price in dollars and cents:
class Price
{
private:
int dollars;
int cents;
public:
Price() { dollars = cents = 0; }
Price(int d, int c) { dollars = d; cents = c; }
bool operator!=(Price);
bool operator<>
};
Write an implementation for both overloaded operators. != should return true if the Prices are not equivalent, and should return false if they are equivalent.< should="" return="" true="" if="" the="" price="" of="" the="" calling="" object="" (left="" object)="" is="" less="" than="" the="" parameter="" price="" object="" (right="" object). ="" you="" do="" not="" need="" to="" demonstrate="" calling="" these="">
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here