# help in coding

Anonymous
timer Asked: Jun 11th, 2018
account_balance_wallet \$15

Question description

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

andythewxman
School: Carnegie Mellon University

Here is your assignment. The file Point.java...

flag Report DMCA
Review

Anonymous
Top quality work from this guy! I'll be back!

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors