Question: Write a complete program named Compute WeightedSum.java. The program reads two integer numbers from console and displays the weighted average of these two numbers. (refer

 Write a complete program named Compute WeightedSum.java. The program reads two

Write a complete program named Compute WeightedSum.java. The program reads two integer numbers from console and displays the weighted average of these two numbers. (refer to example code "ComputeArea With ConsoleInput.java" posted on Moodle) // Define class name as: // Main method header //Create a new object input l/Prompt user to enter an integer number 1 // Declare an integer variables x, and assign a value by invoking nextInt() to call the object input 09 // Prompt user to enter an integer number2 // Declare an integer variable y and assign the input integer number by invoking nextinto using / the calling object input //display the weighted sum of number and number2: 3*number1 + 2number2

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!