Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE ANSWER IN JAVA Write a program that contains two methods, the main() method and another method named computeVelkerFactor(). The program should meet the following
PLEASE ANSWER IN JAVA
Write a program that contains two methods, the main() method and another method named computeVelkerFactor(). The program should meet the following specifications: - The main() method should prompt the user to enter two positive integers. - The main() method should accept the input from the user and store the user input in two variables, both of type int. - You may assume that the user is always perfect and always gives valid input. - The main() method should call the computeVelkerFactor() method, passing the values entered by the user to the computeVelkerFactor() method. - The computeVelkerFactor() method should compute and return the Velker Factor of the two integers entered by the user, and nothing else. The formula for the Velker Factor is given below. - The main () method should use System.out.printf() or String format() to print a formatted message that displays the values entered by the user as well as the Velker Factor of the two numbers. Display the value of the Velker Factor to two decimal places. The program should work correctly for every possible pair of positive integers entered by the user without being altered. The formula for the Velker Factor of two positive integers x and y is: VelkerFactor=5x+2y2x4y Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started