Usetutoringspotscode to get 8% OFF on your first order!

  • time icon24/7 online - support@tutoringspots.com
  • phone icon1-316-444-1378 or 44-141-628-6690
  • login iconLogin

Java code

Java code
Given the corner points of a triangle (x1, y1), (x2, y2), (x3, y3), compute the area.
Hint: The area of the triangle with corner points (0, 0), (x1, y1), and (x2, y2) is |x1 · y2 – x2 · y1| / 2.
Complete the following code:

public class Geometry
{
/**
A method to return the smaller of two integers
@param a, the first integer
@param b, the second integer
@return small, the smaller of the two
*/
public static double triangleArea(double x1, double y1,
double x2, double y2, double x3, double y3)
{

}
}

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes