

If you have any doubts, please give me comment...
import java.util.Scanner;
public class Temperatures{
public static void main(String[] args) {
double[] Temperature = readTemps();
System.out.printf("\nThe average is %.2f%n", averageTemps(Temperature));
highestTemps(Temperature);
lowestTemps(Temperature);
System.out.println("\nThe above statistics are based on the following temperatures: ");
printTemps(Temperature);
}
private static double[] readTemps(){
Scanner keyboard = new Scanner(System.in);
System.out.printf("Enter the number of temperatures: ");
int numTemps = keyboard.nextInt();
double[] Temps = new double[numTemps];
System.out.println("Please enter "+Temps.length+" Temperatures: ");
for(int i=0; i<Temps.length; i++){
System.out.print("Enter grade #"+(i+1)+" of "+Temps.length+": ");
Temps[i] = keyboard.nextDouble();
}
return Temps;
}
public static double averageTemps(double[] numbers){
double sum = 0.0;
for(int i=0; i<numbers.length; i++){
sum = sum+numbers[i];
}
return sum/numbers.length;
}
private static void printTemps(double[] numbers){
for(int i=0; i<numbers.length; i++){
System.out.printf("Grade #"+(i+1)+": %.2f\n",numbers[i]);
}
}
private static void highestTemps(double[] numbers){
double highest = Double.MIN_VALUE;
for(int i=0; i<numbers.length; i++){
if(numbers[i]>highest){
highest = numbers[i];
}
}
System.out.printf("The highest temperature is %.2f\n",highest);
}
private static void lowestTemps(double[] numbers){
double lowest = Double.MAX_VALUE;
for(int i=0; i<numbers.length; i++){
if(numbers[i]<lowest){
lowest = numbers[i];
}
}
System.out.printf("The lowest temperature is %.2f\n",lowest);
}
}

Please help my finish problem 1. Please edit my coding (shown below) about the highestTemps and...
********** PLEASE PROVIDE IN JAVA & NEW SET OF ALGORITHM For this lab use the program at the bottom to sort an array using selection sort. Write a selection sort to report out the sorted low values: lowest to highest. Write another to report out the sorted high values – highest to lowest. Last but not least, the program should output all the values in the array AND then output the 2 requested sorted outputs. -----> MY OLD PROGRAM BELOW...
This is java, please follow my request and use netbeans.
Thank you.
A3 15. 2D Array Operations Write a program that creates a two-dimensional array initialized with test data. Use any primitive data type that you wish. The program should have the following methods: • getTotal. This method should accept a two-dimensional array as its argument and return the total of all the values in the array. .getAverage. This method should accept a two-dimensional array as its argument and return...
The following is a program from Starting out with C++ by Toni Gaddis. I am getting the following error messages pertaining to the lines: cin>>month[i].lowTemp; and months[i].avgTemp = (months[i].highTemp + month[i].lowTemp)/2; The error messages read as follows: error C2039: 'lowTemp': is not a member of 'std::basic_string<_Elem,_Traits,_Ax>' and it continues. The second error message is identical. The program is as follows: Ch. 11, Assignment #3. pg. 646. Program #4. //Weather Statistics. //Write a program that uses a structure to store the...
Java Programming Assignment
Write a class named 2DArrayOperations with the following static
methods:
getTotal . This method should accept a
two-dimensional array as its argument and return the total of all
the values in the array. Write overloaded versions of this method
that work with int , double , and long arrays.
(A)
getAverage . This method should accept a
two-dimensional array as its argument and return the average of all
the values in the array. Write overloaded versions of...
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. You should also have a parallel array to store the names of the 12 months. The program should read the Month's names, and the temperatures from a given input file called temperature.txt. The program should output the highest and lowest temperatures for the year, and the months that correspond to those temperatures. The program must use the following functions:...
Problem 7. Stock Market For this program you are given a String that represents stock prices for a particular com- y over a period of time. For example, you may be given a String that looks like the following: String stockPrices = "1,22,30,38,44,68,49,73,52,66"; Each number in this String represents the stock price for a particular day. The first number is day 0, the second number is day 1, and so on. You can al supplied string will formatted using commas...
PLEASE HELP!!!I need help with the following JAVA PROGRAMS.
Please ready carefully. So this comes from tony
gaddis starting out with java book. I have included the screenshot
of the problems for reference. I need HELP implementing these two
problems TOGETHER. There should be TWO class files. One which has
TWO methods (one to implement problem 8, and one to implement
problem 9). The second class should consist of the MAIN program
with the MAIN method which calls those methods....
Use Java program Material Covered : Loops & Methods Question 1: Write a program to calculate rectangle area. Some requirements: 1. User Scanner to collect user input for length & width 2. The formula is area = length * width 3. You must implement methods getLength, getWidth, getArea and displayData ▪ getLength – This method should ask the user to enter the rectangle’s length and then return that value as a double ▪ getWidth – This method should ask the...
Problem: You will write a program to compute some statistics based on monthly average temperatures for a given month in each of the years 1901 to 2016. The data for the average August temperatures in the US has been downloaded from the Climate Change Knowledge Portal, and placed in a file named “tempAugData.txt”, available on the class website. The file contains a sequence of 116 values. The temperatures are in order, so that the first one is for 1901, the...
this is a java course class.
Please, I need full an accurate answer. Labeled steps of the
solution that comply in addition to the question's parts {A and B},
also comply with:
(Create another file to test the class and output to the screen,
not an output file)
please, DO NOT COPY others' solutions. I need a real worked
answer that works when I try it on my computer.
Thanks in advance.
Write the definition of the class Tests such...