Description: Derived from the Point class describes a rectangle class Rectangle (upper left, lower right corner points determine the rectangle): Rectangle class members of the data: ① public inheritance after the Point class has a point ② to add a member object: protected: Point p2 ③ increase in circumference of the members of the data store: protected: float length ④ members to increase the data storage area: protected: float rectarea Rectangle class member function, friend function:// float distance () ( return 2* (abs (x-p2.x)+ abs (y-p2.y)) ) float area () (return abs (x-p2.x)* abs (y-p2.y) ) derived class object can not access protected members of object! !
To Search:
File list (Check if you may need any files):
a\a.dsp
.\a.dsw
.\a.ncb
.\df.cpp
.\a.opt
.\Debug
a