A polygon is convex if it contains any line segments that connects two points of the polygon.
Question:
A polygon is convex if it contains any line segments that connects two points of the polygon. Write a program that prompts the user to enter the number of points in a convex polygon, enter the points clockwise, then displays the area of the polygon. For the formula for computing the area of a polygon, see http://www.mathwords.com/a/area_convex_polygon.htm. Here is a sample run of the program:
Transcribed Image Text:
Enter the number of points: 7 -Enter Enter the coordinates of the points: -12 0 -8.5 10 0 11.4 5.5 7.8 6 -5.5 0 -7 -3.5 -5.5 -Enter The total area is 244.57
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 42% (7 reviews)
import javautilScanner import javautilArrayList public class Exercise1115 public static void mainString args Scanner input new ScannerSystemin Systemo...View the full answer
Answered By
Utsab mitra
I have the expertise to deliver these subjects to college and higher-level students. The services would involve only solving assignments, homework help, and others.
I have experience in delivering these subjects for the last 6 years on a freelancing basis in different companies around the globe. I am CMA certified and CGMA UK. I have professional experience of 18 years in the industry involved in the manufacturing company and IT implementation experience of over 12 years.
I have delivered this help to students effortlessly, which is essential to give the students a good grade in their studies.
3.50+
2+ Reviews
10+ Question Solved
Related Book For
Introduction To Java Programming And Data Structures Comprehensive Version
ISBN: 9780136520238
12th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically and print the middle-valued string. For example, if the three strings were "abcd", "wxyz",...
-
Write a program that prompts the user to enter the number of students and each students name and score, and finally displays the name of the student with the highest score. Use the next() method in...
-
Write a program that prompts the user to enter the number of students and each students name and score, and finally displays the student with the highest score and the student with the second-highest...
-
Why does Erasmus attack Church officials in his In Praise of Folly? O For spending money on lavish art O For not allowing clergy to marry O For supporting military campaigns O For selling pardons and...
-
Suppose that each call a student makes to his girlfriend has an average length of 12 minutes, and the standard deviation of the length of each call is also 3 minutes. Estimate the probability that he...
-
(a) Make a frequency distribution and histogram for the monthly off-campus rent paid by 30 students. (b) Repeat the exercise, using a different number of bins. Which is preferred? Why? 730 1030 740...
-
Quilts R Us (QRU) is considering investing in a new patterning attachment with the cash flow profile shown in the table below. QRU's MARR is 13.5 percent/year. a. What is this investment's external...
-
Three different plans for financing an $18,000,000 corporation are under consideration by its organizers. Under each of the following plans, the securities will be issued at their par or face amount,...
-
Discuss the ways in which wrong decision making can impact the success of a project. Highlight the various leadership styles that were utilized in the case. Give examples specifically from the case....
-
Rosario Department Store uses a perpetual inventory system. Data for product E2-D2 include the following purchases. On June 1, Rosario sold 26 units, and on August 27, 40 more units. Prepare the...
-
Revise Listing 7.9, Calculator.java, to accept an expression as a string in which the operands and operator are separated by zero or more spaces. For example, 3+4 and 3 + 4 are acceptable...
-
Programming Exercise 11.1 defined the Triangle class with three sides. In a triangle, the sum of any two sides is greater than the other side. The Triangle class must adhere to this rule. Create the...
-
In terms of rewards and intrinsic motivation, Cameron et al. (2001) conducted a statistical procedure called____________ , and one of the findings indicated that verbal rewards ___________...
-
What is the FUTURE VALUE of $1,000 invested for 8 years at 4% with SEMI-ANNUAL Compounding rounded to the nearest penny?
-
Open BlockWorks in "What If" mode. What changes would happen on Mateo's Schedule D if he sold a painting on May 13, 2021, for $2,500 that he purchased May 12, 2020, for $1,800?
-
An investment yielded 0% return in October, 10% return in November and 32% return in December. What was the average monthly realized yield on the investment in last quarter of the year? (Provide your...
-
Define an excise tax and its purpose. What industries are subject to this tax? How might this affect your business planning decisions before your open a new business? Does the excise tax rate vary by...
-
The following information is relevant for an individual firm operating in a perfectly competitive market. Output 30 Variable Cost $2,700 Fixed Cost $130 Marginal Cost $80 Price $80 What will be the...
-
Four people sit in a car. The masses of the people are 45 kg, 52 kg, 67 kg, and 61 kg. The car's mass is 1020 kg. When the car drives over a bump, its springs cause an oscillation with a frequency of...
-
Which property determines whether a control is available to the user during run time? a. Available b. Enabled c. Unavailable d. Disabled
-
Write a program that reads a file and displays a histogram to show the occurrences of each letter in the file, as shown in Figure 16.40b. The file name is entered from a text field. Pressing the...
-
Write a program that displays a text file in a text area, as shown in Figure 16.40a. The user enters a file name in a text field and clicks the View button; the file is then displayed in a text area....
-
Write a program that enables the user to specify the location and size of the rectangles and displays whether the two rectangles intersect, as shown in Figure 16.39b. Enable the user to point the...
-
The effective interest rate on bonds payable reflects the effective cost of borrowing at what interest rate?
-
For the month of October, the Accounting and IT departments incurred costs of $180,000 and $260,000, respectively. The company uses the step-down method to allocate support costs with the accounting...
-
Within six months, a 35% rise in revenue is part of the aim. Which three important business-related topics should the company plan emphasise?
Study smarter with the SolutionInn App