"> <<"Coordinate centre of figure =",> GetCoordPt (this-> CenFig); <
<<"Coordinate point on circle =",> GetCoordPt (this-> PtOnFig); <
<<"The angle at the base of the sector =" < SecAng <
<<"Radius of figure =" < FigRad < AreaFigure (Shape);
} Figure :: AreaFigure (Figure & Shape)
{square; ((this-> SecAng * 180/M_PI)> 360) <<"Area of?? the figure is ="
< FigRad, 2) * (2 * M_PI - this-> SecAng)/2; <<"Area of ​​the figure is = "
<
} Figure :: RotateFig (Figure & Shape, int j)
{Angle; Rotate (0,0); <<"Please enter the coordinates of the point around which"
<<"to make his turn" <
{<
<<"Please enter a corner where you want to rotate a shape -";>> Angle;
} = M_PI;> CenFig.RotatePoint (Rotate, Angle, j);> PtOnFig.RotatePoint (Rotate, Angle, j);
} Figure :: SetFigure (Point & Centre, Point & OnFigure)
{> CenFig = Centre;> PtOnFig = OnFigure;> SecAng = this-> SetAngle ();> CalcRadCirc ();
} Figure :: SetAngle ()
{Angle; [2]; (); (; ;)
{<<"Please enter a corner at the base of the sector" <<
"(in radians):"; = scanf ("% lf" "% 1 [^ n]" "% * [^ n]", & ; Angle, str); (num! = 1)
{(" n>> Only digits and only one number allowed! << n"); (); (num == 0) ("% * [^ n] ");
} (Angle <0 | | Angle> 2 * M_PI)
{<> corner at the base of the sector must be" <<
"greater than 0 and less than 2 * Pi <<" <
};
} Angle;
} :: Figure (Point & Cen, Point & Pt, double Ang): CenFig (Cen), PtOnFig (Pt), SecAng (Ang)
{_t seconds = time (NULL); * timeinfo = localtime (& seconds);> CalcRadCirc (); <
<
<<"Figure:" <
<<"Coordinate centre of figure =",> GetCoordPt (this-> CenFig); <
<<"Coordinate point on circle =",> GetCoordPt (this-> PtOnFig); <
<<"The angle at the base of the sector =" < SecAng <
<<"Radius of figure =" < FigRad <
<<"Figure." <
} :: ~ Figure ()
{_t seconds = time (NULL); * timeinfo = localtime (& seconds); <
<