JAVA. The question mentioned was: Create a class called Point that represents a point in the cartesian coordinate system. The class should have fields representing the x coordinate and y coordinate (both are integer type).
Question I need an answer to: Write a client class that would create two objects in the Point class above called p1 and p2 and assigns values to the filed in these objects. Print out the x coordinate followed by x comma and last coordinate enclosed by parenthesis for each object.
For example if for a point x=40, any y=50 the output should be (40,50).
If you have any doubts comment below
Output
Get Answers For Free
Most questions answered within 1 hours.