Question: Write code to assign x and y coordinates to currCoord, and store currCoord in locations. Input first receives an x value, then a y

  Write code to assign x and y coordinates to currCoord, and store 

Write code to assign x and y coordinates to currCoord, and store currCoord in locations. Input first receives an x value, then a y value. Input example: 12 32 88 2-1-1 1 #include 2 #include 3 using namespace std; 4 5 class Coordinate ( public: void SetXAndY(int coordinatex, int coordinateY) ( x-coordinatex; y coordinateY; void PrintCoordinate() const { cout < < x < < < < y < < endl; int GetX() const { return x; } int GetY() const (return y; } 10 ) 11 12 13 } 14 15 16 17 private: 18 int x; 19 int yi 28 ); 21 22 int main() { 23 24 25 26 27 28 29 30 31 32 33 34 35 vector locations; Coordinate currCoord; int currX; int curry; unsigned int i; cin >>> currx; cin >> curry; while ((currX > 0) && (currY > 0)) { Your code goes here */ cin >> currX;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

locations while True x intinputEnter ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!