SLIDE 1
Agenda / Learning Objectives:
- 1. Run the following command and extract lab14.tar in your venus
account (note the dot): cp ~ctse/cs211/lab14.tar . ; tar xvf lab14.tar
- 2. Understand the logic from lines 81 to 83 in Ch8Prog6.cpp.
- 3. Read the tips and pitfalls starting on page 2.
- 4. Complete the following exercise from the textbook.
Review class lectures with Chapter 8 question 2: Rational number class
Define a class for rational numbers. A rational number is a number that can be represented as the quotient of two integers. For example, 1/2, 3/4, 64/2, and so forth are all rational numbers. (By 1/2 and so on we mean the everyday fraction, not the integer division this expression would produce in a C++ program.) Represent rational numbers as two values of type int, one for the numerator and
- ne for the denominator. Call the class Rational. Include a constructor with two arguments that