Write out your answers for these questions on a separate piece of paper.
Question #1: An enumeration is a new ____________ in a C++ program.
Question #2: The values of an enumeration are called ____________.
Why is an enumeration preferable to a
Question #4: A value of an enumeration is similar to a(n) ____________, and so we use the same rules for naming their identifiers.
Question #5: The ____________ increments the variable before returning a value.
Write an enumeration declaration for
Color with enumerators
for red, green, and blue.
Declare the variable
theColor to be of type
initialized to represent the color red.
Write an expression to increment
theColor (assuming the
operator has been defined).
Write another (different) expression to increment
(assuming that this other operator has also been defined).
Write an expression to see if
theColor stores the enumerator
for the color blue.