help in coding

help in coding

package point;

public class Point {
public int XCoord;
public int YCoord;

// default
public Point (){
XCoord=0;
YCoord=0;
}
// alternative
public Point (int X, int Y){
XCoord=X;
YCoord=Y;
}
//Getters
public int getX{
return X;
}
public int getY{
return Y;
}
// Method name Set
public void set(){
XCoord=X >=0? X :0;
YCoord=Y >=0? Y :0;
}
//  print to print each Point object as (x, y)
public void Print(){
System.out.println(“(” + X + “,” +Y + “)”);
}
// toString
public String toString(){
return // What should we print here??
}

//equals to compare 2 Point objects for equality
public boolean equals( Object Obj){
if (Obj instanceof X){
X other= (X) obj;
//…… it is missing something
}
else
return false;
}
// copy and getCopy to make a copy of a Point object into another Point object
public Point{

}
//distanceFromOrigin to calculate the distance between a point and the origin at(0,0)
public void distanceFromOrigin(){

}

//distance to calculate the distance from a point to a given point.
public void distance () {

}

//translate to shift the location of a point by a given amount
public void translate () {

}

//isHorizontal that returns true if any given point lines up horizontally with a given point.
public boolean isHorizontal(){

}

//isVertical that returns true if any given Point object lines up vertically with a given Point object.
public boolean isVertical(){

}

//slope that returns the slope of the line between this Point object and a given Point object.
public int slope(){

}

}

Please complete the coding parts and take screen shots of the outputs. Please upload it in a .java file

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper