Question: number 5# please use Java ( clipse IDE prefered) o Nashville: 01=36.12=0.6304 rad, A1= -86.67 = -1.5127 rad Christmas Los Angeles: 02 = 33.94 =

 number 5# please use Java ( clipse IDE prefered) o Nashville:

number 5# please use Java ( clipse IDE prefered)

o Nashville: 01=36.12=0.6304 rad, A1= -86.67 = -1.5127 rad Christmas Los Angeles: 02 = 33.94 = 0.5924 rad, A2 = -118.40 = -2.0665 rad Using these values in the angular distance equation, you get Day Presents Received Total Presents 1 1 1 2 2. 3 3 3 6 4 4 10 5 5 15 rAo=6372.795x0.45306=2887.259 km Thus, the distance between these cities is about 2887 km, or 1794 miles. (Note: To solve this problem, you will need to use the Math.acos method, which returns an arccosine angle in radians.) 4. Write a program that prompts for the lengths of the sides of a triangle and reports the three angles. 6. Write a program that produces calendars as output. Your program should have a method that outputs a single month's calendar like the one below, given parameters to specify how many days are in the month and what the date of the first Sunday is in that month. In the month shown below, these values are 31 and 6, respectively. 5. Write a program that computes the spherical distance between two points on the surface of the Earth, given their latitudes and longitudes. This is a useful operation because it tells you how far apart two cities are if you multiply the distance by the radius of the Earth, which is roughly 6372.795 km. Mon Tue Sun Wed Thu Fri Sat 1 1 6 13 20 27 7 14 21 28 1 8 15 22 29 2 9 16 23 30 3 10 17 24 31 4. 11 18 25 5 12 19 26 1 | 1 1 | 1 Let 01,2,, and 02, , be the latitude and longitude of two points, respectively. AX, the longitudinal difference, and Ao, the angular difference/distance in radians, can be determined as follows from the spherical law of cosines: Ao=arccos(singlsing2+coso 1coso2cosa) For example, consider the latitude and longitude of two major cities: One tricky part of this program is making the various columns line up properly with proper widths. We will learn better ways of formatting output in the next chapter. For now, you may copy the following helper method into your program and call it to turn a number into a left-padded string of a given exact width. For example, the call System.out.print(padded (7, 5)); prints " 7" (the number 7 with four leading spaces). o Nashville, TN: N 367.2', W 8640.2 Los Angeles, CA: N 3356.4', W 11824.0' You must convert these coordinates to radians before you can use them effectively in the formula. After conversion, the coordinates become // Returns a string of the number n, left-padded // with spaces until it is at least the given width. public static String padded (int n, int width) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!