CS-521 Homework 2

$30.00

Download Details:

  • Name: CS_521_hw_2-tvkhss.zip
  • Type: zip
  • Size: 305.39 KB

Category:

Description

Rate this product

Complete the following problems from the textbook: 2.1, 2.3, 2.5 (pages 55-59) and 3.1, 3.3, 3.5
(pages 85-88).
*3.3 (Geography: estimate areas) Find the GPS locations for Atlanta, Georgia;
Orlando, Florida; Savannah,. Georgia; and Charlotte, North Carolina from
www.gps-data-team.com/map/ and compute the estimated area enclosed by these
four cities. (Hint: Use the formula in Programming Exercise 3.2 to compute the
distance between two cities. Divide the polygon into two triangles and use the formula in Programming Exercise 2.14 to compute the area of a triangle.)
3√3 is The formula for computing the area of a pentagon is Area = 352, where s
2
TT
the length of a side. The side can be computed using the formula s = 2r sin 5
where r is the length from the center of a pentagon to a vertex. Here is a sample
run:
Enter the length from the center to a vertex: 5.5
The area of the pentagon is 108.61
Enter
3.1 (Geometry: area of a pentagon) Write a program that prompts the user to enter the
length from the center of a pentagon to a vertex and computes the area of the pentagon, as shown in the following figure.
r
Where to submit?
Click Assignments in the Navigation Area and then click on the title of the assignment to enter the
submission area and upload your response.