Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a java program that reads temperature data from the user and displays statistical data cOSC 210-002 Dr. T. Fries Assignment #1 - Java Review

write a java program that reads temperature data from the user and displays statistical data
image text in transcribed
cOSC 210-002 Dr. T. Fries Assignment #1 - Java Review Due: Wednesday, February 7, 2018 at the beginning of class The objectives of this assignment are to: 1. Review and gain further experience in the use of the Eclipse IDE for Java 2. Review and gain further experience in Java programming. 3. Review and gain further experience in the use of Java sentinel-controlled loops 4. Gain an understanding and experience in passing arrays to methods. Write a Java program that reads temperature data from the user and displays statistical data about those temperatures. The program will begin by asking the user to enter the name of the location of the readings. (Note: the location may contain spaces and commas.) Create an aray of ten doubles. Read in temperature values from the user and store them in the array until -999 is entered or ten values have been entered. Use appropriate prompts to request user input. When done reading temperatures, print a report in the exact format shown below. While printing, use the following static methods to determine Celsius, high, low, and average temperatures Description Method double fToC double fahrenheit returns Celsius equivalent double max( double[] arr, int num) returns largest value in array arr that contains num values double min( double[] arr, int num retuns smallest value in array arr that contains num values returns average of values in array arr that contains num values double average( double[] arr, int num) get location Create (aren heit Ciol Create far count sCeISUS CIO aet -temp Sample output for Moose Jaw, MT Temperatures in Moose Jaw, MT Fahrenheit Celsius while (temp 35 . 21.5 14. 32.5 1.7 -5.8 -10.0 0.3 faren heitLcountl- count t+ High Low 35.0 14.0 45 Average25.8 Save the file as Prog1.java. print +hem our

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

What are the important facts related to this situation?

Answered: 1 week ago