In the real estate business, it is convenient to be able to quickly determine the area of a piece of land. In this project, you are to write a C++ program that can compute the area of any quadrilateral (four-sided) piece of land if the lengths of all sides and one diagonal are given. The technique for doing this is to divide the area into two triangular areas and use a standard formula for the area of each triangle.
If we consider the sides as being "north," "east," "south," and "west" and the diagonal as being from the northwest corner to the southeast corner (as shown below), then the computation of the land area is the sum of the areas of the two triangles that are formed.
The formula for computing the area of a triangle whose sides
are referred to as A, B, and C is
square root of (S * (S - A) * (S - B) * (S - c))
where S = 0.5 * (A + B + C)
Your program should prompt for the lengths of the sides and the diagonal (assume the entered values are measured in feet and are floating point values). Compute the area of land in square feet and display that value with appropriate annotation. Also, compute and display with annotation the land area in acres; there are 43,560 square feet in one acre. These displays should include three decimal places in the results. You should test the program with a variety of data to be sure it works - part of the grading will be based on how robust your program is.
Hand in a printout of your program produced by the development environment and a printout from the results window when the following values are entered: north 406.2, east 683.65, south 445.1, west 1013.7, and diagonal 821.4.
There are several ways you may need to try to print the results window. One way to print is with the "Print Screen" key - Hold down the shift key and press Print Screen; this may not output because there is no form feed at the end of the results window. Or you may copy the entire window to the clipboard (hold down Alt and press Print Screen); then, paste it into a document, such as an MS Word document and print. Or mark and copy the contents of the window to the clipboard, then paste it into a wordprocessor document (even Note Pad can accept this) and print.