// Wyo C++ Ch. 12 Demo 7 #include <iostream.h> #include "M:\C++ Programming\AP classes\apstring.h" struct GradeLevel { int yearGraduation; int numStudents; apstring valedictorian; GradeLevel(); GradeLevel(int, int, apstring); int getNumStudents(); void setNumStudents(int); void displayAll(); }; int main() { GradeLevel seniors; GradeLevel juniors(2003, 123, "mike"); seniors.setNumStudents(111); seniors.displayAll(); juniors.displayAll(); cout << "\n\n"; return 0; }// end of main GradeLevel::GradeLevel() { yearGraduation = 0; numStudents = 0; valedictorian = ""; } GradeLevel::GradeLevel(int year, int num, apstring name) { yearGraduation = year; numStudents = num; valedictorian = name; } int GradeLevel::getNumStudents() { return numStudents; } void GradeLevel::setNumStudents(int num) { numStudents = num; } void GradeLevel::displayAll() { cout << "year of graduation:\t" << yearGraduation << endl << "number of students:\t" << numStudents << endl << "valedictorian:\t\t" << valedictorian << endl << endl; }