Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

thank you!!

image text in transcribed

/* 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

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions