Question: in c + + 1 4 . 4 6 Lab ( CH 7 ) : Triangles In Space In this lab you will expand your
in c Lab CH: Triangles In Space
In this lab you will expand your SpacePoint class to include the listed member functions.
You will also create TriangleClass functions needed to represent a triangle w points in space.
See Default Template for details on functions needed.
Once you have tested your new class functions, you can safely output "ALL TESTS PASSED!" with endline to indicate code is completed.
using: #include
#include
using namespace std;
class SpacePoint
public:
void SetCoordsint x int y; Sets the value for member variables xCoord and yCoord
int GetX; returns xCoord
int GetY; returns yCoord
void Print;
SpacePoint operatorSpacePoint b; Overloads operator and adds two points:
xyxy is xx yy
private:
int xCoord;
int yCoord;
;
class TriangleClass
public:
void SetPointsSpacePoint Ain, SpacePoint Bin, SpacePoint Cin;
double GetArea;
void Print;
private:
SpacePoint A;
SpacePoint B;
SpacePoint C;
;
int main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
