The material presented in this guide covers the concepts emphasized on Test 2. It is meant to guide students studying and reviewing for Test 2; it is not guaranteed to be comprehensive. Actual test questions will differ from the examples given here. Students should use this guide in addition to other study activities (like reading Chapters 8-10, reviewing completed lab assignments, old quizzes, etc.) Knowledge of Chapters 1-7 is assumed, but the emphasis is on material in Chapters 8-10.
For example, given the function
Be able to write a C++ function given its specification. The code may involve any of the concepts in Chapters 2-10. Thus, in order to write the code you may need to:
For example, complete the following function named
accepts two integer parameters,
function returns true if numerator/denominator
represents a fraction reduced to lowest terms;
otherwise, it returns false if the fraction
numerator/denominator can be reduced. For example,
is_reduced(1, 2) would evaluate to true, but
is_reduced(2, 4) would evaluate to false.
Improper fractions are acceptable, but
should return false whenever
denominator is zero.
Also, take time to review all the code we have developed in class.
It has all been uploaded to the course repository on GitHub