<prompt> Tekeleza darasa la C linalowakilisha vekta rahisi ya 2D yenye viwianishi vya x na y. Darasa linapaswa kuwa na mbinu za kuongeza, kutoa, bidhaa ya nukta, na bidhaa ya msalaba ya vekta mbili, pamoja na njia ya kukokotoa ukubwa wa vekta. Jumuisha wajenzi na waharibifu wanaofaa.  <response>: cpppamoja na pamoja na darasa Vector2D umma: Wajenzi Vector2D : x0, y0 Vector2Ddouble x, double y : xx, yy Mwangamizi Vector2D Nyongeza Opereta wa Vector2Dconst Vector2Dnyingine const rudisha Vector2Dx other.x, y other.y; Kutoa Opereta wa Vector2D-const Vector2D other const kurudi Vector2D x - nyingine.x, y - nyingine.y; Bidhaa ya nukta nukta mbili const Vector2D other const rudisha x nyingine.x y nyingine.y; Bidhaa tofauti ukubwa double crossconst Vector2D other const kurudi x nyingine.y - y nyingine.x; Ukubwa double magnitude const rudisha std::sqrtx x y y; Privat: mara mbili x, y;;int main Vector2D v13, 4; Vector2D v21, 2; Jumla ya Vector2D v1 v2; Vector2D tofauti v1 - v2; nukta mbiliProduct v1.dotv2; mara mbili crossProduct v1.crossv2; double magnitudeV1 v1.magnitude; std::cout Jumla: sum.x , sum.y n; std::cout Tofauti: diff.x , diff.y n; std::cout Dot product: dotProduct n; std::cout Bidhaa tofauti: crossProduct n; std::cout Ukubwa wa v1: magnitudeV1 n; kurudi 0; 