Home > Back-end >  thinking
thinking

Time:03-24

Define a class Circle Circle, the main () function to finish the test,

Circle class data members include:
(1) the static data constant PI (double), the value of 3.1415
(2) the private data members: radius radius (double),

Circle a class member function include:
(1) definition and constructor Circle (double) and copy constructor Circle (Circle & amp;) , including the Constructor parameters default value is 0, the output information "Constructor run", the copy Constructor output information "CopyConstructor run"
(2) define the Destructor, the Destructor output information "Destructor run"
(3) members of the public function: void setRadius (double) and double getRadius () returns and set the radius
(4) define public member functions to double circumference () is used to calculate the circumference of the circle
5. Define public member functions to double area () is used to calculate the area of a circle
6 class defined Circle of friends function of double fCircle_L (Circle & amp; R) and double fCircle_S (Circle & amp; R), were used to calculate the circle r pupil,