Name: | _______________________________ |
Student ID: | _______________________________ |
class Date { int year, month, day; } class Person { Date birthDate; string name; } class Student : public Person { float GPA; } class Employee : public Person { }
#includeusing namespace std; class Badness { private: int level; public: Badness(int l=0) : level(l) {}; int howbad() { return level; } }; int main() { try { throw Badness(100); } catch( Badness& b ) { cout << "caught Badness of level " << b.howbad() << endl; } }