<prompt> Tekeleza darasa la C linalowakilisha nukta ya 2D na viwianishi vya x na y. Jumuisha majukumu ya wanachama kwa kuhesabu umbali kati ya pointi mbili, kuangalia ikiwa pointi tatu zinaunda pembetatu, na kutafuta eneo la pembetatu linaloundwa na pointi tatu. Andika kazi kuu ili kuonyesha matumizi ya darasa hili.PLINFORMAT  <response>: pamoja na pamoja na darasa Point2D umma: mara mbili x, y; Mjenzi aliye na maadili chaguo-msingi ya x na y Point2Ddouble x 0.0, double y 0.0 : xx, yy Kazi ya kuhesabu umbali kati ya pointi mbili umbali mara mbili const Point2D other const rudisha std::sqrtstd::pownyingine.x - x, 2 std::pownyingine.y - y, 2; Kitendaji tuli cha kuangalia ikiwa alama tatu zinaunda pembetatu tuli bool isTriangleconst Point2Da, const Point2D b, const Point2D c double ab a.umbalib; bc mbili b.umbalic; double ca c.umbalia; rudisha ab bc ca bc ca ab ca ab bc; Kazi tuli ili kupata eneo la pembetatu linaloundwa na pointi tatu pembetatu mbili tuliAreaconst Point2Da, const Point2Db, const Point2D c ikiwa !isTrianglea, b, c kurudi 0; double ab a.umbalib; bc mbili b.umbalic; double ca c.umbalia; mara mbili s ab bc ca 2; nusu ya mzunguko kurudi std::sqrts s - ab s - bc s - ca; Fomula ya Heron ;int main Point2D p10, 0; Point2D p23, 4; Point2D p36, 8; std::cout Umbali kati ya p1 na p2: p1.distancep2 std::endl; ikiwa Point2D::isTrianglep1, p2, p3 std::cout Pointi huunda pembetatu. std::endl; std::cout Eneo la pembetatu: Point2D::triangleAreap1, p2, p3 std::endl; nyengine std::cout Pointi hazifanyi pembetatu. std::endl; kurudi 0; 