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: 58% (12 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?
-
the regulatory environment in which cable systems operate?
-
What three items determine the amount deducted from an employee's wages for federal income taxes?
-
The results below are based on data collected as part of a student project for an introductory statistics class at UF. If there is more than one group/treatment, the first group mentioned is group 1....
-
i need help with 4-16. i havent figured these out right my tracher isnt explaining these. in OS S-15 Calle 054-16 2017 2016 Using the information Calculating debt to equity ratio LO7 Calculate the...
-
Richard chooses technique 0 and 2 requiring 10+10-20 efforts and provising 10+11=21 benefits. Hence, 21 is returned as the output Example 2: input1: 3 input2: (10,10,10,10) input3: (10,11,12,15)...
-
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...
-
Complete the following table by indicating whether a debit or credit is used to increase or decrease the balance of the following accounts. The appropriate debit/credit terminology has been...
-
Problem 1. In a study of infant birth weight and maternal factors, the newborn babies were categorized as being either small size for gestational age (N=201) or normal size (N=2089). The following...
-
Max 1 page allowed] Consider a DRAM chip of capacity 256 KB and each memory location contains 8 bits. The memory chip is organized in matrix form with equal number of rows and column for each memory...
-
find the dimensions of a notman window of perimeter 3 9 ft that will admit the greatest possible amount of light. Round answer to two decimal places
-
Consider the expression timing is everything in relation to the building of the TOMS brand. Besides the influence of recovering economic conditions and the increased affluence of potential customers,...
-
What is corporate strategy and why is it important? Choose a company with which you are familiar, and evaluate its corporate strategy, especially in regards to financial strategies. What are some...
-
Which of the following statements creates a two-dimensional array that contains three rows and four columns? a. int rates[3, 4] = {0}; b. int rates[4, 3] = {0}; c. int rates[3][4] = {0}; d. int...
-
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...
-
() Y 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 D 0 1 1 0 1 1 1 1 0 1 0 1 7. For Exercise 2.6e implement the design in SV (there are multiple ways)...
-
Requirement. For each depreciation method prepare a depreciation schedule showing asset cost de connected dopeciation and book for the units of production method, round depreciation of unilla three...
-
Audit documentation of the evidence gathered by the auditor should meet which of the following criteria? (2 points) Workpapers are prepared in sufficient detail so that they can be given to the...
Study smarter with the SolutionInn App