A convex 4-vertex polygon is divided into four triangles, as shown in Figure 8.9 .Write a program
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 of four vertices and displays the areas of the four triangles in increasing order. Here is a sample run:
Transcribed Image Text:
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)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 60% (10 reviews)
Program Plan Create getIntersectionPoint method so that accepts the values of four points and then f...View the full answer
Answered By
Anjali Arora
Having the experience of 16 years in providing the best solutions with a proven track record of technical contribution and appreciated for leadership in enhancing team productivity, deliverable quality, and customer satisfaction. Expertise in providing the solution in Computer Science, Management, Accounting, English, Statistics, and Maths.
Also, do website designing and Programming.
Having 7 yrs of Project Management experience.
100% satisfactory answers.
5.00+
3+ Reviews
10+ Question Solved
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Assume that a task is divided into four equal-sized segments and that the system builds an eight-entry page descriptor table for each segment. Thus, the system has a combination of segmentation and...
-
Assume a task is divided into four equal-sized segments and that the system builds an eight-entry page descriptor table for each segment. Thus, the system has a combination of segmentation and...
-
Based in Ankara, Turkey, Aselsan is the largest military electronics manufacturer in Turkey. The company is divided into four divisions: Communications (HC), Radar, Electronic Warfare and...
-
Derive the velocity potential for a doublet; i.e., derive Eq. (3.88).
-
Let F be a fixed 3 ( 2 matrix, and let H be the set of all matrices A in M2(4 with property that FA = 0 (the zero matrix in M3(4). Determine if H is a subspace of M2(4?
-
Some metals can exist in more than one form, differing in how their atoms are arranged in the solid. Shown here are two forms of the same metal. One form is denser than the other. Which is denser and...
-
How would the primordial helium content of the universe have been affected if the present cosmic background radiation temperature was \(27 \mathrm{~K}\) instead of \(2.7 \mathrm{~K}\) ? What about...
-
Tim Urban, owner/ manager of urbans Motor Court in Key West, is considering outsourcing the daily room cleanup for his motel to Duffys Maid Service. Tim rents an average of 50 rooms for each of 365...
-
Differentiate between Market and Book Value of an asset. Define how the Book Value of an asset is calculated for tax purposes. Explain how the market or sales value of an asset might be estimated.
-
Chip enters Annas office one day, saying, I think the project will be a good one, even though its taking some long hours to get started. Anna looks up from her screen and smiles. I like what youve...
-
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...
-
In computational geometry, often you need to find the rightmost lowest point in a set of points. Write the following method that returns the rightmost lowest point in a set of points.public static...
-
(Multiple Choice) (1) True or false: (a) Gauss's law holds only for symmetric charge distributions. (b) The result that E = 0 inside a conductor can be derived from Gauss's law. (2) True or false:...
-
company that is using its assets at only 85% of their full capacity generated Sales of $680,000 last year. The company's Net Profit Margin was 7.6% and they paid dividends equal to 22% of net profit....
-
In 2022, Rich (28) lived with his daughter, Ava (4), his brother, Joe (18), and his fiance, Linda (30) for the entire year. Rich's adjusted gross income is $36,555, Joe's gross income is $4,100,...
-
Display the American flag using a nested loop of these dimensions: 7x20 flag 4x7 stars as Alternate and to represent stripe colors ***** === ======
-
Connor and Martin are contemplating international business in their industry and feel that global expansion is a great transition for the company. They do not feel as if they understand IFRS and are...
-
In Fig. 6-14, a mass of 30 kg Is supported by a compression member CD and two tension members AC and BC. CD makes an angle of 400 with the wall. A, B, and Care in a horizontal .plane. AEEB-1000 mm....
-
Prepare journal entries to record the following transactions involving both the short-term and long-term investments of Cancun Corp., all of which occurred during calendar-year 2017. Use the account...
-
A container holds 2.0 mol of gas. The total average kinetic energy of the gas molecules in the container is equal to the kinetic energy of an 8.0 10-3-kg bullet with a speed of 770 m/s. What is the...
-
A(n) ____________ is a statement used in testing programs that should be true; if it is not true, an exception is thrown. A. Verification b. Throwable c. Assertion d. Declaration
-
Write an application named BadSubscriptCaught in which you declare an array of eight first names. Write a try block in which you prompt the user for an integer and display the name in the requested...
-
The Double.parseDouble() method requires a String argument, but it fails if the String cannot be converted to a floating-point number. Write an application in which you try accepting a double input...
-
The benefit of the person-environment fit model is that it allows us to put housing options on an x-y axis comparing autonomy and competence. in terms of two conflicting forces: environmental press...
-
Problem 2: Pat and Chris Broderick have just purchased a home in Lincoln Park. The home's sale price was $549,000. As a veteran, Pat was able to get a 30-yr loan, with an APR of 3.75% compounded...
-
Summarize: The challenge of sustainability will impact the hospital health care setting significantly. Hospitals are high energy consumers due to their 24/7 operation. To become sustainable, they...
Study smarter with the SolutionInn App