Due Thursday, 1999 Dec 02, at the beginning of class.
Read Chapter 6 of the textbook. Recursion is discussed in Chapter 12. For online documentation of the Standard Template Library, where many of the classes recently presented in class appear, see http://www.sgi.com/Technology/STL/.
When submitting a program, please submit a printed copy of the program's code prepended with comments briefly describing its input and output. Please indent your code to make it readable. See Section 2.5 of the textbook for style hints. If you desire, you can also submit examples demonstrating your program's correctness.
For a description of what the program should do, see the previous program description. She wants you to create a Time class and then use Time objects in the program. To improve the code's maintainability, she really likes private members, both data and functions. Also, remember how she muttered ``I hate reference variables. A mark of a good programmer is to use them only when necessary.'' You succeeded last time in avoiding unnecessary reference variables; try to do it again.
Hints
20
10
40
30
the function should return 100. You can assume that a calling program
has opened the file. Your function should not print anything; it
should just return the sum for a calling program to print.
2.2
1.1
3.3
-1.0
-2.0
-3.0
and the scaling factor is -2, the function should change the
elements of the array to the following:
-4.4
-2.2
-6.6
2.0
4.0
6.0
Your function should not print anything; any printing should be
done by the function's caller.