Question: Write a method that returns the area of a triangle using the following header: public static double getTriangleArea(double[][] points) The points are stored in a

Write a method that returns the area of a triangle using the following header: public static double getTriangleArea(double[][] points) The points are stored in a 3-by-2 two-dimensional array points with points [0] [0] and points [0] [1] for (xl, y1). The triangle area can be computed using the formula in Programming Exercise 2.19. The method returns 0 if the three points are on the same line. Write a program that prompts the user to enter three points of a triangle and displays the triangle's area. Here is a sample run of the program: Enter x1, y1, x2, y2, x3, y3: 2.5 2 5 -1.0 4.0 2.0 The area of the triangle is 2.25 Enter x1, y1, x2, y2, x3, y3: 2 2 4.5 4.5 6 6 The three points are on the same line
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
