1. When you
have two functions with the same name, what is this called?
2. Write an
expression which would generate a random double between
and 3 and 8 (including 3 but not including 8). (There
are actually two
ways of doing this).
3. Look at fishsim.cpp.
a. Which statement do you suppose places the fish
into the pond in their starting
locations?
b. Since the statement cin >> numSteps obtains
the input from the user, what do you suppose is the purpose of getline(cin, s)?
4. What is
returned by the apstring accessor function named c_str() ? Explain what it does.
5. Write a
fish.dat file that will simulate the following starting positions:
|
C |
|
A |
|
E |
|
|
B |
|
D |
|
6. Which
functions in the Environment class are available to clients of this class?
7. Open your browser and point it to:
http://www.vark-learn.com/documents/general.pdf
Read the directions CAREFULLY.
Answer the questions.
Score your results.