|
course.wilkes.edu/CS125Labs |
||||||
Lab 11: Instructor's Notes
This exercise introduces the student to enumeration types in C++. The exercise consists of eight parts. Note that versions of GNU C++ (g++) prior to version 2.8.0 are not sufficiently ANSI-compliant as to permit the completion of parts 4-8. If you are using a version of g++ older than 2.8.0, you should upgrade to the lastest version, as it is much more ANSI-compliant than the older versions.
In the first seven parts,
the students develop a In addition to the enumeration itself, students implement the input, output, prefix increment, postfix increment, prefix decrement, and postfix decrement operations for their new type. The students will use the files driver11.cpp, Gender.h, Gender.cpp, Gender.doc, and makefile11 in this part of the exercise.
Since defining these operations is a mechanical process for
every enumeration one is likely to declare,
we have provided a code-generating program
"enumGenerator.cpp"
that, given the desired name for an enumeration and an
input file of enumerators (one per line), will generate the
complete header, implementation and documentation files
for such an enumeration.
Students use this tool to build a As always, if you wish to avoid network contention, save local copies of the required files ahead of time and instruct your students on how to access them.
|
Home Membership
|
|||||
|
Last update: Friday, October 6, 2000 at 12:30:38 PM. |
||||||