You are on page 1of 1

//---------Richard-Ramsey-Rodriguez---//------mixed.

h------------#include <iostream> using namespace std; class Mixed { friend friend friend friend Mixed Mixed Mixed Mixed operator+(const operator-(const operator*(const operator/(const Mixed& Mixed& Mixed& Mixed& ,const Mixed& ); , const Mixed&); , const Mixed&); ,const Mixed&);

friend ostream& operator<<(ostream& , const Mixed& ); friend istream& operator>>(istream& , Mixed& );

public: //constructors Mixed(int p, int n, int d); Mixed(int a=0); //mutators double Evaluate(); int ToFraction(); void Simplify(); //accessors int GetWholeNum(); int GetNumerator() const; int GetDenominator() const; //bool operators bool operator==(Mixed& ); bool operator<(Mixed& ); bool operator>(Mixed& ); bool operator!=(Mixed& ); bool operator<=(Mixed& ); bool operator>=(Mixed& );

// increment and decrement Mixed& operator++(); // Mixed operator++(int); // Mixed& operator--(); // Mixed operator--(int); // private:

operations prefix increment postfix increment prefix decrement postfix decrement

bool setvalue(int p, int n, int d); int numerator; int denominator; int wholenum; };

You might also like