The weather in South Western Ontario can fluctuate dramatically, so it can be a bit of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The weather in South Western Ontario can fluctuate dramatically, so it can be a bit of a challenge to put out information about what is normal weather for a given time period. With that in mind, we need to write a program called WeatherAnalyzer(StudentID).java that will allow the user to enter some daily temperatures in Celsius degrees over a number of days. The program will calculate and print out the average high temperature, the average low temperature, the highest temperature for a given time period, the lowest temperature for the same time period, and the range of temperatures. Detailed Description: Your program will first explain that it will calculate and display some statistics about the temperatures you enter. The program will ask the user for the number of days they will be analyzing. Each high temperature will be stored in an array of the appropriate data type. Set the size of your array based on how many days the user will be entering temperatures. Each low temperature will also be recorded for the same time period in a separate array. After all of the temperature data has been entered, your program will call four separate methods to do the data analysis. The first method will accept the high temperature array as a parameter and it will calculate and return the average of all the temperatures in the array. You will call the method again, but this time, you will be sending in the low temperature array and will send back the average of the low temperature. The second method will take the high temperature array as a parameter and it will find the highest daily temperature in the array and return this value. The third method will take the low temperature array as a parameter and it will find the lowest daily temperature in the array and return this value. The fourth method will take in both arrays and find the difference between the lowest and highest temperatures and return this value as the range of temperatures. NOTE: all displayed values should be ROUNDED to ONE decimal place if necessary. Sample Output: Mike's Weather Analyzer Program **** Please let me know the number days we will be analyzing: 4 Please enter the high temperature for day #1: 34.5 Please enter the low temperature for day #1: 23.3 Please enter the high temperature for day #2: 33.1 Please enter the low temperature for day #2: 22.8 Please enter the high temperature for day #3: 35.6 Please enter the low temperature for day #3: 24.7 Please enter the high temperature for day #4: 27.4 Please enter the low temperature for day #4: 18.7 Here are the statistics for the 4 days entered. The average high temperature was 32.7 degrees. The average low temperature was 22.4 degrees. The low temperature was 18.7 degrees. The high temperature was 35.6 degrees. The range betweeen the high and low temperatures was 16.9 degrees. The weather in South Western Ontario can fluctuate dramatically, so it can be a bit of a challenge to put out information about what is normal weather for a given time period. With that in mind, we need to write a program called WeatherAnalyzer(StudentID).java that will allow the user to enter some daily temperatures in Celsius degrees over a number of days. The program will calculate and print out the average high temperature, the average low temperature, the highest temperature for a given time period, the lowest temperature for the same time period, and the range of temperatures. Detailed Description: Your program will first explain that it will calculate and display some statistics about the temperatures you enter. The program will ask the user for the number of days they will be analyzing. Each high temperature will be stored in an array of the appropriate data type. Set the size of your array based on how many days the user will be entering temperatures. Each low temperature will also be recorded for the same time period in a separate array. After all of the temperature data has been entered, your program will call four separate methods to do the data analysis. The first method will accept the high temperature array as a parameter and it will calculate and return the average of all the temperatures in the array. You will call the method again, but this time, you will be sending in the low temperature array and will send back the average of the low temperature. The second method will take the high temperature array as a parameter and it will find the highest daily temperature in the array and return this value. The third method will take the low temperature array as a parameter and it will find the lowest daily temperature in the array and return this value. The fourth method will take in both arrays and find the difference between the lowest and highest temperatures and return this value as the range of temperatures. NOTE: all displayed values should be ROUNDED to ONE decimal place if necessary. Sample Output: Mike's Weather Analyzer Program **** Please let me know the number days we will be analyzing: 4 Please enter the high temperature for day #1: 34.5 Please enter the low temperature for day #1: 23.3 Please enter the high temperature for day #2: 33.1 Please enter the low temperature for day #2: 22.8 Please enter the high temperature for day #3: 35.6 Please enter the low temperature for day #3: 24.7 Please enter the high temperature for day #4: 27.4 Please enter the low temperature for day #4: 18.7 Here are the statistics for the 4 days entered. The average high temperature was 32.7 degrees. The average low temperature was 22.4 degrees. The low temperature was 18.7 degrees. The high temperature was 35.6 degrees. The range betweeen the high and low temperatures was 16.9 degrees.
Expert Answer:
Answer rating: 100% (QA)
Certainly Below is a sample Java program named WeatherAnalyzerjava that fulfills the requirements you provided java import javautilScanner public clas... View the full answer
Related Book For
Intermediate Accounting
ISBN: 978-0176509736
10th Canadian Edition, Volume 1
Authors: Donald Kieso, Jerry Weygandt, Terry Warfield, Nicola Young,
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
5) On the graphs below show the difference between a change in price and a change in demand. Fully label graphs for full marks! (2+2 marks) Change in price Change in demand X 6) A change in the price...
-
The mass of the crane?s boom is 9000 kg. Its weight acts at?G. The sum of the moments about?P?due to the boom?s weight, the force exerted at?B?by the cable?AB,?and the force exerted at?C?by the...
-
Northstar Financial invested some of the funds of its investors with Schwab Total Bond Market Fund, a fund registered with the SEC under the Investment Company Act. In compliance with the Act, Schwab...
-
Find the derivative of y with respect to x, t, or , as appropriate. y = ln 3 X
-
Refer to information in QS 21-14. Compute the overhead volume variance for November and classify it as favorable or unfavorable. Data From QS 21-14 AirPro Corp. reports the following for November....
-
A residential moving company needs to move a family from city 1 to city 12 in Figure where the numbers on the arcs represents the driving distance in miles between cities. a. Create a spreadsheet...
-
Introduction : provide the reader a bulleted list of all the points your will discuss in the presentation. Database Management Systems: identify some basic concepts associated with database...
-
Angela Petrillo recendy opened her own law office, which she operates as a corporation. The name of the new entity is Angela Petrillo, Attorney. Petrillo experienced the following events during the...
-
Although it is not currently the responsibility of businesses to track and manage the social, economic and environmental impacts of theirs actions, as consumer awareness has been heightened about the...
-
A bond has a face value of ?$1200 and a 10?% coupon. rate, its current price is $1140? and it is expected to increase to $1150 next year.
-
A monopolist makes $20 million a year and will keep this profit level given that no other firm enters the market. However, the entry of another firm will reduce the monopolists profits to $10 million...
-
1) Public int search(int target): if the target is found in the array, return the frequency of its showing up. If the target is not found in the array, return -1. If the array is empty, return -1; 2)...
-
Discuss the major difference between linear and non-linear break-even analysis.
-
Files and the rest of the program is shared in this google drive link ( https://drive.google.com/file/d/1rn7RjpKcvcow6SHQrMMclJ0FIMSQj3Wo/view?usp=sharing ) This assignment deals with a program that...
-
A muscle that originates on the structure labeled A is the: Select one: a. vastus medialis b. vastus lateralis c. tibialis anterior d. gastrocnemius e. pectoralis major Mark Niesen
-
The following selected accounts and normal balances existed at year-end. Notice that expenses exceed revenue in this period. Make the four journal entries required to close the books: Accounts...
-
Feretti Inc. had beginning inventory of $22,000 at cost and $30,000 at retail. Net purchases were $157,500 at cost and $215,000 at retail. Net markups were $10,000, net markdowns were $7,000, and...
-
The following transactions fall somewhere in the continuum of the choices in accounting decision-making that are shown in Illustration 2-5. 1. The company president approaches one of the company's...
-
Dr. John Gleason, M.D., maintains the accounting records of Bones Clinic on a cash basis. During 2014, Dr. Gleason collected 5146,000 in revenues and paid 555,470 in expenses. At January 1, 2014, and...
-
A diploid organism has a total of 14 chromosomes and about 20,000 genes per haploid genome. Approximately how many genes are in each linkage group?
-
By conducting testcrosses, researchers have found that the sweet pea plant has seven linkage groups. How many chromosomes would you expect to find in leaf cells of sweet pea plants?
-
Describe the unique features of ascomycetes that facilitate genetic analysis of these fungi.
Study smarter with the SolutionInn App