Question: Write a Java program ( called ETest 6 ) which reads in any two integers and reports the results of three computations performed by the
Write a Java program called ETest which reads in any two integers and reports the results of three computations performed by the methods listed below. You must call the three other functions from main and must use and printout their returned results within main. You must produce input and output in the precise form shown below in the Example interaction and you must write and use the following public static functions as part of your solution:
void main String args which reads in two numbers, and calls the other three functions to determine the results to print out. This function must use the values which are returned by the other functions and must be the only function to print anything.
int sumOfCommonDivisors int number int number which returns the sum of all whole positive numbers which divide evenly into both number and number
eg if passed and it will return which is
int highestDigitsint number int number which returns a positive number where each digit in this number is the larger of corresponding individual digits in the two passed numbers
eg if passed and it will return
int getSquaresBetweenint number int number returns an array of integers each of which is the square of any other integer and which lies between number and number inclusive. The numbers in the array should be listed from lowest to highest.
eg if passed and it will return an array containing the numbers
eg if passed and it will return an array containing the numbers
Example interaction separate test runs:
Enter any two integers
: The sum of the common divisors of and
: The 'highest digits' of and
: The squares between and
Enter any two integers
: The sum of the common divisors of and
: The 'highest digits' of and
: The squares between and
Enter any two integers
: The sum of the common divisors of and
: The 'highest digits' of and
There are no squares between and
Enter any two integers
awf
Error in input. You needed to supply integer values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
