Given the following class declaration,
class Rational
{
public:
Rational();
Rational(int numer, int denom);
int getNumerator() const;
int getDenominator() const;
friend void display(ostream& out, const Rational& value);
friend bool operator(const Rational& left, const Rational& right);
private:
int numerator;
int denominator;
};
what must we add to the class in order for the following code to compile?
Rational myRational(2,3);
if ( 3 < myRational)
a. We need another < operator that expects an integer as the second parameter.
b. We need another < operator that expects an integer as the first parameter.
c. We need a constructor that expects a ration number
d. We need a constructor that expects an integer
e. A or D
f. B or D
f. B or D
You might also like to view...
HTML-formatted messages cannot contain viruses.
Answer the following statement true (T) or false (F)
Anidattribute value can be assigned to ______ element(s).
A. one B. two C. five D. an unlimited number
If a script is written for use in CentOS 7, how many times should a command line that is executed multiple times be written?
only once two times one time per execution three times
You cannot lock transparency or image pixels in a(n) ____________________ layer.
Fill in the blank(s) with the appropriate word(s).