Question: thank you!! /* PROBLEM 4 */ /*Given the following code, write two methods: - The first should simplify the input of each number (similar to

thank you!!

thank you!! /* PROBLEM 4 */ /*Given the following code, write two

/* PROBLEM 4 */ /*Given the following code, write two methods: - The first should simplify the input of each number (similar to the MethodActivity) Use this to replace the redundant statements - The average method to calculate the average of the 3 numbers. Ensure that you comment the code statements and create the method JavaDoc comments. */ public class CodingAssignment2_P4 public static void main(String[] args) Scanner in = new Scanner(System.in); System.out.print("Input the first number: "); double x = in.nextDouble(); System.out.print("Input the second number: "); double y = in.nextDouble(); System.out.print("Input the third number: "); double z = in.nextDouble(); System.out.print("The average value is " + average (x, y, z)+" ")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!