Question: The Assignment: java programing Assume you have a file with the daily high temperatures for the year. You are to write a program to read

The Assignment: java programing

Assume you have a file with the daily high temperatures for the year. You are to write a program to read the high temperatures from this file and count how many days the high was at each temperature. Your output should be a histogram of the results labeled with the corresponding temperature and the actual count. For example, the output might look like the following:

Results

temp count 101 1 * 100 0 99 2 ** 98 2 ** 97 4 **** 96 1 * 95 0 94 5 ***** 93 3 *** 

Hints

1. Keep the totals for each temperature in one spot in an array.

2. Use the temperature as an index into the array where the totals are kept.

3.After all data is read and the array has the final values, print one line for each spot in the array.

data:

54 38 42 40 34 51 54 58 61 55 54 42 40 34 51 54 54 54 38 60 42 40 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 32 28 24 18 9 4 22 31 38 34 41 32 28 24 18 31 38 34 41 32 28 24 18 31 38 34 41 32 28 31 38 35 51 34 41 56 63 59 66 48 46 58 41 56 63 51 59 48 46 58 41 56 63 53 52 58 48 49 58 41 56 63 51 52 59 58 66 63 71 69 70 72 67 66 63 71 74 75 69 73 78 72 67 63 71 74 59 56 69 70 78 72 66 71 74 69 70 78 72 67 63 59 58 57 64 71 72 67 63 59 64 71 73 79 75 78 72 67 63 59 63 71 73 75 78 72 67 63 57 73 77 75 78 72 67 71 73 77 75 78 81 83 87 84 91 92 90 84 76 83 82 89 78 81 83 87 84 91 92 90 84 78 85 82 89 96 91 78 81 83 86 82 91 92 90 84 85 82 89 92 96 91 95 97 98 91 95 97 93 87 85 94 89 92 96 93 96 97 98 98 100 102 95 97 93 87 88 89 93 84 89 92 95 95 95 97 94 91 87 84 80 90 82 80 73 75 70 74 74 75 70 66 63 71 69 70 72 67 66 63 71 55 59 53 58 52 67 63 71 74 59 56 69 70 58 62 56 51 54 49 60 68 62 67 63 59 58 57 64 44 38 42 40 34 51 54 55 54 42 40 34 51 54 54 54 38 42 31 38 34 41 32 28 24 18 31 38 34 41 32 28 24 18 31 38 34 41 32 28 31 28 35 41 34 37 26 23 29 40 45 46 39 31 40 38 29 34 36 

thank you so much

 

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!