Question
in Java: A point in the x - y plane is represented by its x-coordinate and y-coordinate. Design a class, pointType, that can store and
in Java:
A point in the x - y plane is represented by its x-coordinate and y-coordinate. Design a class, pointType, that can store and process a point in the x - y plane. You should then perform operations on a point, such as :
Print the point
Set the x-coordinate
Set the y-coordinate
Get the x-coordinate
Get the y-coordinate
Add() : add two points
Sub(): subtract two points
Mul(): multiply two points
Div(): divide one point from the other
Ass(): assign one point to the other
Equ(): check if two points are equal
LessThan(): check if one point is less than the other Note: R = X2 Y2
The default constructor
The second constructor
The copy constructor 2.
## Design a class pointTypeTest to test the design of pointType.
Thank you in advance!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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