Write code to assign x and y coordinates to currCoordinate, and store currCoordinate in locations. Input first receives an x value, then a y value. Input example: 12 32 88 2 -1 -1 5 class Coordinate { 6 7 8 9 10 11 12 13 14 15 16 17 18 25 26 27 28 29 30 31 32 33 34 35 public: void SetXAndY(int coordinatex, int coordinateY) { x = coordinatex; y coordinateŸ; } void Print Coordinate() const { 19 20 }; 21 22 int main() { 23 24 38 39 cout << x << " - " << y << endl; } int GetX() const { return x; } int GetY() const { return y; } private: int x; int y; vector locations; Coordinate currCoordinate; int currx; int curry; unsigned int i; cin >> currX; cin >> curry; while ((currx > 0) && (curry >= 0)) { Y Your code goes here */ cin >> currx; Curry: S Scanner 'L CamScanner for (i = 0; i < locations.size(); ++i) {
Write code to assign x and y coordinates to currCoordinate, and store currCoordinate in locations. Input first receives an x value, then a y value. Input example: 12 32 88 2 -1 -1 5 class Coordinate { 6 7 8 9 10 11 12 13 14 15 16 17 18 25 26 27 28 29 30 31 32 33 34 35 public: void SetXAndY(int coordinatex, int coordinateY) { x = coordinatex; y coordinateŸ; } void Print Coordinate() const { 19 20 }; 21 22 int main() { 23 24 38 39 cout << x << " - " << y << endl; } int GetX() const { return x; } int GetY() const { return y; } private: int x; int y; vector locations; Coordinate currCoordinate; int currx; int curry; unsigned int i; cin >> currX; cin >> curry; while ((currx > 0) && (curry >= 0)) { Y Your code goes here */ cin >> currx; Curry: S Scanner 'L CamScanner for (i = 0; i < locations.size(); ++i) {
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
![Write code to assign x and y coordinates to currCoordinate, and store currCoordinate in locations. Input first receives an x value,
then a y value. Input example: 12 32 88 2 -1 -1
CS
5 class Coordinate {
6
7
8
9
10
11
12
13
14
15
25
26
27
28
29
30
31
32
33
34
35
public:
void SetXAndY (int coordinatex, int coordinateY) {
x= coordinatex;
y coordinateỸ;
16
17
18
19
20 };
21
22 int main() {
23
24
38
39
}
void Print Coordinate() const {
cout << x <<
}
int GetX() const { return x; }
int GetY() const { return y; }
private:
int x;
int y;
<< y << endl;
vector<Coordinate> locations;
Coordinate currCoordinate;
int currx;
int curry;
unsigned int i;
Scanne
cin >> currx;
cin >> curry;
while ((currx > 0) && (curry >= 0)) {
Y Your code goes here /
cin >> currX;
Curry:
L
CamScanner
for (i = 0; i < locations.size(); ++i) {](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fcb175027-e9a1-4019-8ff9-ececa1c6d29a%2F7e8ca7ef-676d-48d3-a015-bd44db4d4007%2Fbqu78u_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Write code to assign x and y coordinates to currCoordinate, and store currCoordinate in locations. Input first receives an x value,
then a y value. Input example: 12 32 88 2 -1 -1
CS
5 class Coordinate {
6
7
8
9
10
11
12
13
14
15
25
26
27
28
29
30
31
32
33
34
35
public:
void SetXAndY (int coordinatex, int coordinateY) {
x= coordinatex;
y coordinateỸ;
16
17
18
19
20 };
21
22 int main() {
23
24
38
39
}
void Print Coordinate() const {
cout << x <<
}
int GetX() const { return x; }
int GetY() const { return y; }
private:
int x;
int y;
<< y << endl;
vector<Coordinate> locations;
Coordinate currCoordinate;
int currx;
int curry;
unsigned int i;
Scanne
cin >> currx;
cin >> curry;
while ((currx > 0) && (curry >= 0)) {
Y Your code goes here /
cin >> currX;
Curry:
L
CamScanner
for (i = 0; i < locations.size(); ++i) {
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning