I'm teaching C++ for about 2 years in high schools, computer training institutes and etc. After teaching basics about variables, arrays, structures, functions, I always start object oriented examples part with traditional examples, like this one:
class Person {
public:
Person();
~Person();
char* getFirstName(); //we can use std::string instead of char* in optimization part
char* getLastName();
char* getFullName();
int getAge();
bool getGender();
void printFullProfile();
void setFirstName(char*);
void setLastName(char*);
void setAge(unsigned int);
void setGender(bool);
void setGender(char);//f for female, m for male.
private:
char* first_name;
char* last_name;
unsigned int age;
bool gender; //ladies 1(st) , male 0
}
and then completing this Person class and teach new things like why getter and setters methods are evil and avoiding accessors, inheritance, polymorphism by creating other classes ( like Student, Employee, Moderator etc. ), necessary OOP skills and concepts.
[EDIT]: And make these classes useful for solving programming problems. ( Like calculating salary for each Employee object, Students marks average, and many others )
another basic examples are Vehicle class, Shape class, etc.
I wanna know your ideas about how to (JUST) start an OOP classroom.
looking forward for great ideas.