Question: A convex 4-vertex polygon is divided into four triangles, as shown in Figure 8.9 .Write a program that prompts the user to enter the coordinates

A convex 4-vertex polygon is divided into four triangles, as shown in Figure 8.9.Write a program that prompts the user to enter the coordinates of four vertices and displays the areas of the four triangles in increasing order. Here is a sample run:Enter x1, y1, 2, 2, 3, 3, 4, 4: JEnter -2.5 2

4 4 3 -2 -2 -3.5 The areas are 6.17 7.96 8.08

Enter x1, y1, 2, 2, 3, 3, 4, 4: JEnter -2.5 2 4 4 3 -2 -2 -3.5 The areas are 6.17 7.96 8.08 10.42 V2 (x2, y2) V1 (x1, y1) V (3, 3) V4 (x4, y4)

Step by Step Solution

3.39 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Program Plan Create getIntersectionPoint method so that accepts the values of four points and then f... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!