Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
locations while True x intinputEnter ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started