class shape // parent class { public: shape(); void setlength(int); int getlength(); void setwidth(int); int getlength(); private: int length; int width; }; class rectangle:public shape // single : to identify the class that is inheriting (rectanlge is inheriting from shape) // rectangle is a child of shape // everything is copied from shape into rectangle // can only access the parents public parts not private (-_-) { public: rectangle(); int area; int perimeter(); private: friend int thing; //assigns friendship to a class allowing private variables to be access }; class traingle:public shape //another child, sibling of rectangle { public: };