Unformatted text preview: Cout should show the fraction object. For example, this function should show 1/3 if the numerator = 1 and denominator = 3. The << operator should also reduce the fraction . For example, the fraction 2/6 should display as 1/3. The fraction 20/6 should display as 10/3. If the numerator or denominator (or both) are negative numbers, the << operator should display the fraction correctly. For example, if the fraction data is stored as -1/-3, cout should display 1/3, if the fraction data is 1/-3, cout should display -1/3. Write a program that demonstrates the use of each member function in the fraction class. In addition to this lab, also review the Word document “Session 12” that has been posted to the website. Please, again, refer to “Session 11” and to our textbook, parts of chapter “Lesson 13” for additional information. Page 1 of 1...
View Full Document
- Spring '06
- Computer Science, Fraction, Elementary arithmetic, fraction data