#include #include using namespace std; // class definition class Employee { public: // data members string name, title; int reviews[10]; int review_ct; // constructor Employee(string _name, string _title); // method void addReview(int score); }; // constructor definition Employee::Employee(string _name, string _title) { // note: works with class variables! name = _name; title = _title; review_ct = 0; } // method definition void Employee::addReview(int score) { // note: works with class variables! reviews[review_ct] = score; review_ct++; } int main() { // constructor called automatically when creating a class variable (object) Employee boss("Ted", "Schmuck"); // methods are called "on" an object boss.addReview(3); boss.addReview(2); boss.addReview(24); system("pause"); return 0; }