Home / Expert Answers / Computer Science / java-please-what-is-the-output-the-following-program-below-after-implementing-the-methods-for-the-pa951

(Solved): Java please What is the output the following program below after implementing the methods for the ...



What is the output the following program below after implementing the methods for the Point class?
public static void main(St

Java please

What is the output the following program below after implementing the methods for the Point class? public static void main(String [] args) \{ Point \( p 1= \) new Point \( (10,100) \); Point p2 = new Point \( (90,10) \); Point p3 = new Point \( (10,10) \); System.out.println("The manhanttan distance of points \( p 1 \) and \( p 2 \) is: " + p1.manhattanDistance(p2)); System.out.println("The slope distance of points \( p 1 \) and \( p 2 \) is: " + p1.slope(p2)); System.out. println("Is \( p 1 \) vertically above \( p 2 \) : " + p1.isVertical(p2)); System.out. println("The manhanttan distance of points \( p 1 \) and \( p 3 \) is: " + p1.manhattanDistance(p3)); System. out. println("Is p1 vertically above \( \mathrm{p} 3 \) : " + p1. isVertical \( (\mathrm{p} 3) \) );


We have an Answer from Expert

View Expert Answer

Expert Answer


Here p1 = (10, 100), p2 = (90, 10), p3 = (10, 10) To find mahattanDistance = |x2 - x1|+ |y2-y1| = (90-10) + (10-100) = 80+90 = 170 The manhanttan dist
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe