|
|
|
|
|
|
|
Chapter 10
Case Study Follow-Up |
|
|
|
|
|
|
|
|
2. The readability of the program is enhanced because we are using the actual values rather than char codes for the plays. |
|
|
|
 |
|
|
|
|
void PrintJanuary()
{
cout << Tracy Anderson: 1/14 << end1;
cout << Dallas Lightfoot: 1/27 << end1;
} |
|
|
|
|
|
|
|
|
Chapter 11
Exam Preparation Exercises |
|
|
|
|
|
|
|
|
5. a. enum BirdType {CARDINAL, BLUEJAY, HUMMINGBIRD, ROBIN};
b. int sightings[4];
7. 1 3 -2
17 6 11
4 2 2
19 14 5
11 15 -4
52 40 12 |
|
|
|
|
|
|
|
|
Chapter 11
Programming Warm-Up Exercises |
|
|
|
|
|
|
|
|
1. void Initialize( /* out */ Boolean failing[],
/* in */ int length )
// Precondition:
// length <= MAX_STUD
// Postcondition:
// failing[0..length-1] == FALSE
{
int index; // Loop control and index variable
|
|
|
|
|
|