24.9k views
0 votes
Java Coding

Task #1 void Methods

1. Create the file YournameProjectThreeTask1.java

2. In the main method, declare and create an array of doubles of size 5 called ftemp.

3. Add a line in the main method that calls the enterTemps method.

4. Write a static method that takes your array as its parameter and does not return a value. In this method the user should be able to enter any five Fahrenheit temperatures.

User Jason Wood
by
8.6k points

1 Answer

4 votes

Final answer:

The Java coding task involves creating a program to declare an array, call a method for user input of temperatures, and to write said method for recording five Fahrenheit temperatures into the array.

Step-by-step explanation:

The question relates to a Java coding task where the student is asked to create a Java program that involves working with arrays and method calls. Specifically, the student needs to declare an array of doubles, write a method to handle user input for temperatures, and allow entry of five Fahrenheit temperatures. Here is how the task can be achieved:

  • Declare an array named ftemp with a size of five in the main method.
  • Call the enterTemps method from the main method.
  • Write the enterTemps method which allows the user to input five Fahrenheit temperatures and stores them in the ftemp array.

Note that the task involves understanding arrays, methods, and user input in Java.

User Apramc
by
8.5k points