The material presented in this guide covers the concepts emphasized on Test 3. It is meant to guide students studying and reviewing for Test 3; 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 10-17, reviewing completed lab assignments, old quizzes, etc.) Knowledge of Chapters 1-9 is assumed, but the emphasis is on material in Chapters 10-17.
std::vector
objects: creating, accessing,
using, manipulating
std::string
objects
public
vs.
private
access,
constructors, destructors, this
,
const
methods, accessors, mutators,
overloading operators
protected
access, method overriding
For example, given the function
func({10, 34, 19, 40, 0, 12, 88})
?
Be able to write a C++ function given its specification. The code may involve any of the concepts in Chapters 2-17. Thus, in order to write the code you may need to:
std::vector
objects
For example, complete the following function named
is_balanced
that
accepts a vector of integers. The
function returns true if the number of positive
integers in the vector equal the number of negative
integers in the vector. Zero is considered neither
positive nor negative, so zeros do not affect the
result.
For example,
is_balanced({-4, 7, -9, 0, 8})
would evaluate to true, but
is_reduced({2, -14, 8})
would evaluate to false.
Also, take time to review all the code we have developed in class.
It has all been uploaded to the course repository on GitHub
(
https://github.com/halterman/124_F17).