//类的聚集-何洁月C++课件东南大学

//类的聚集class Rectangle //Rectangle类的定义{public: //外部接口Rectangle(Point xp1, Point xp2); double GetArea(){return area;} private: //私有数据成员Point p1,p2; //Point类的对象p1,p2 double area; }; Rectangle::Rectangle(Point xp1, Point xp2) //类的聚集的构造函数:p1(xp1),p2(xp2) { cout
ppt 文件大小:4.34MB