1. A point in the x-y plane is représented by its x-coordinate and y- coordinate, Design the class Polnt that can store and process a point in the x-y plane. - We should then perform operations on a point, such as showing the point, setting the coordinates of the point, printing the coordinates of the point, returning the x-coordinate, and returning the y-coordinate. - Write a test program to test various operations on a point. The class Point should contain the following methods and data members: 1. protected members x and y 2. default constructor 3. constructor with parameters 4. setPoint(x) 5. getX() 6. gety() 7. toString( ) 8. equals(x) 9. makeCopy(x) 10. getCopy( ) | 11. printPoint( ) The output should show the following: - Initialize myPoint = [5.00,4.00] Initialize yourPoint = [0.00, 0,00] - Print both of these objects Set yourPoint to [5.00, 45.00] and print it Determine if the 2 points are equal or not Change the myPoint coordinates to (6.00, 9.00] Print this new myPoint object Copy myPoint into yourPoint and then print the yourPoint object
1. A point in the x-y plane is représented by its x-coordinate and y- coordinate, Design the class Polnt that can store and process a point in the x-y plane. - We should then perform operations on a point, such as showing the point, setting the coordinates of the point, printing the coordinates of the point, returning the x-coordinate, and returning the y-coordinate. - Write a test program to test various operations on a point. The class Point should contain the following methods and data members: 1. protected members x and y 2. default constructor 3. constructor with parameters 4. setPoint(x) 5. getX() 6. gety() 7. toString( ) 8. equals(x) 9. makeCopy(x) 10. getCopy( ) | 11. printPoint( ) The output should show the following: - Initialize myPoint = [5.00,4.00] Initialize yourPoint = [0.00, 0,00] - Print both of these objects Set yourPoint to [5.00, 45.00] and print it Determine if the 2 points are equal or not Change the myPoint coordinates to (6.00, 9.00] Print this new myPoint object Copy myPoint into yourPoint and then print the yourPoint object
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Java
![1. A point in the x-y plane is représented by its x-coordinate and y-
coordinate, Design the class Polnt that can store and process a point in the
x-y plane.
- We should then perform operations on a point, such as showing the point,
setting the coordinates of the point, printing the coordinates of the point,
returning the x-coordinate, and returning the y-coordinate.
- Write a test program to test various operations on a point.
The class Point should contain the following methods and data members:
1. protected members x and y
2. default constructor
3. constructor with parameters
4. setPoint(x)
5. getX()
6. gety()
7. toString( )
8. equals(x)
9. makeCopy(x)
10. getCopy( )
| 11. printPoint( )
The output should show the following:
- Initialize myPoint = [5.00,4.00]
Initialize yourPoint = [0.00, 0,00]
- Print both of these objects
Set yourPoint to [5.00, 45.00] and print it
Determine if the 2 points are equal or not
Change the myPoint coordinates to (6.00, 9.00]
Print this new myPoint object
Copy myPoint into yourPoint and then print the
yourPoint object](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb64c1c6f-d4d7-4d8b-8ebe-5eadb49feddc%2F2e406cf2-5808-4dbb-9a69-9fd681d029f7%2Fcmpqlbf_processed.png&w=3840&q=75)
Transcribed Image Text:1. A point in the x-y plane is représented by its x-coordinate and y-
coordinate, Design the class Polnt that can store and process a point in the
x-y plane.
- We should then perform operations on a point, such as showing the point,
setting the coordinates of the point, printing the coordinates of the point,
returning the x-coordinate, and returning the y-coordinate.
- Write a test program to test various operations on a point.
The class Point should contain the following methods and data members:
1. protected members x and y
2. default constructor
3. constructor with parameters
4. setPoint(x)
5. getX()
6. gety()
7. toString( )
8. equals(x)
9. makeCopy(x)
10. getCopy( )
| 11. printPoint( )
The output should show the following:
- Initialize myPoint = [5.00,4.00]
Initialize yourPoint = [0.00, 0,00]
- Print both of these objects
Set yourPoint to [5.00, 45.00] and print it
Determine if the 2 points are equal or not
Change the myPoint coordinates to (6.00, 9.00]
Print this new myPoint object
Copy myPoint into yourPoint and then print the
yourPoint object
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 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY