# include
# include
# include
using namespace std;
The class point
{
Public:
Void getX ();
Void getY ();
Point ()
{
X=0;
Y=0;
}
Point (double a, double b);
Private:
Double X;
Double Y;
};
Point: : point (double a, double b)
{
X=a;
Y=b;
}
The void point: : getX ()
{
cout
The void point: : getY ()
{
cout
Double point: : * (x1) (double X);
Double (point: : * x2) (double Y);
The class Triange
{
Public:
Void getArea ();
Void getPerimeter ();
Triange (point p1, point p2, point p3);
Private:
Point P1.
Point P2.
Point P3;
};
Triange: : Triange (point p1, point p2, point p3)
{
P1=p;
The p2=p2;
P3=p3;
}
Void Triange: : getArea ()
{
Int a1, a2, a3, b1, b2, b3.
Double area;
Area=a1 * b2 - a1 + a2 * * b3 b3 - a2 + b1 - a2, a3 * * * b1 b2.
cout<" The area of a triangle is "& lt; }
Void Triange: : getPerimeter ()
{
Double generating;
Generating=SQRT ((P2) getX - P1) getX ()) * (P2) getX () - P1. GetX) + (P2) getY - P1) getY) * (P3) getY - P1) getY)) + SQRT ((P3) getX - P1) getX ()) * (P3) getX - P1) getX) + (P3) getY - P1) getY) * (P3) getY - P1) getY)) + SQRT ((P3) getX - P2) getX) * (P3) getX - P2) getX) + (P3) getY - P2) getY) * (P3) getY - P2) getY));
cout<" The perimeter of the triangle is "& lt;
Int main ()
{
Int a1, a2, a3, b1, b2, b3.
Point P1 (=1 a1, b1=2);
Point P2 (a2=7, b2=2);
Point P3 (a3=7, b3=6);
Triange T1 (P1, P2, P3);
T1. GetArea ();
T1. GetPerimeter;
system("pause");
}