I need some help with a Program
I am new to java, and i am taking a class in school. the professor wants us to write a program but i have no idea what i am doing.
Here is what is asked of me:
Write i program called temperatures.java that would prompt users to enter five (5) integer temperature values into an array of five integers. The program would then display back
a. all values entered
b. the sum of all numbers
c. and their average with two decimal points.
The program should be written with the class Temperatures, that would have the following data members:
int temperatures = new int;
and the following methods:
public void getData(), that would prompt users to enter 7 temperature values
public void computeSum(), that would sum up all the values and store the result into the total variable
public void computeAverage(), that would compute the average and store the result into the average variable
public void displayData(), that would display all the values from the array, the total and the average
Write a separate program with the main function, called TemperaturesTest.java,
that would call the methods getData(), computeSum(), computeAverage(), and displayData() from the class program Temperatures.java.
Put the program into an indefinite loop until a "n" is entered at the prompt "Continue?[y/n]".
please i need the help. badly:confused::(
Moving to "New to Java" sub forum
Moving to the "New to Java" sub forum...