Question: Enhanced Lab 2.5 [2 lab points Create a class named QuadArea that will ask the user for the z and y coordinates of 4 points
Enhanced Lab 2.5 [2 lab points Create a class named QuadArea that will ask the user for the z and y coordinates of 4 points on a coordinate system and will then compute and report the area of the quadrilateral formed by those four points using this formula: Test your program on some quadrilaterals for which you know the area. Note that the formula only works if the quadrilateral does not cross itself. Below is a sample run for the test case shown here: xi: 3 y1: 4 x2: 7 y2: 3 x3: 10 y3: 7 x4: 5 y4: 10 area is 27.5 If you like geometry, you can verify this answer by putting a rectangle around the 4 givern points, finding the area of this rectangle, and then subtracting the areas of the 4 right triangles that shouldn't be included in the area of the quadrilateral
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
