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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!