# Difference: Lab9 (2 vs. 3)

#### Revision 32015-11-17 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="WebHome"

# Lab 9

### Due: Nov 19, 11:55pm

Line: 30 to 30

• (a/b) / (c/d) = (a*d) / (c*b)
• -(a/b) = (-a/b)
• (a/b) < (c/d) means (a*d) < (c*b)
Changed:
<
<
• (a/b) = (c/d) means (a*d) = (c*b)
>
>
• (a/b) `= (c/d) means (a*d) =` (c*b)
Let any sign be carried by the numerator; keep the denominator positive.
>
>

### Class member funtions

Will need at least the following class methods for the class `Rational`:

• Rational(); // Defaul constructor
• Rational(int x, int y); // constructor
• Rational(int x); // Constructor of x/1
• Rational add(Rational x);
• Rational minus(Rational x);
• Rational iimes(Rational x);
• Rational divide(Rational x);
• bool less(Rational x);
• bool equals(Rational x);
• void input(); // Inputs into this rational
• void output(x); // Outputs this rational

### Program Operation

Write a mainline that asks for two rational numbers to be typed in, and does all of the operations, just as seen in the example below:

Line: 49 to 64
Thanks for using this program. \ No newline at end of file