Question: Write a Java program ( called ETest 1 0 ) which reads in a single integer and prints whether or not that number in an
Write a Java program called ETest which reads in a single integer and prints whether or not that number in an Achilles number. 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 a single number, and printed whether on not that number is an Achilles Number.
boolean isAchillesNumber int number which returns whether or not the passed number is an Achilles number. An Achilles number is one which powerful but NOT a perfect power. The first Achilles numbers are
boolean isPerfectPower int number which whether the passed number is a perfect power. An perfect power is a number which can be computed by raising some other number to a power. For example is a perfect power as it can be computed by raising to the power ie The first powerful numbers are
boolean isPowerful int number which returns whether the passed number is a powerful number. An integer is called powerful if for every prime dividing evenly into also divides evenly into For example is a powerful number as the only prime which divides evenly into it is and which also divides evenly into The first powerful numbers are
int getPrimeFactors int number which returns an array containing the prime factors of the passed number, in ascending order. Eg
if passed it will return as and & are primes. if passed it will return as and & are primes.
if passed it will return as is a prime already.
if passed any number it will return null.
Example interaction separate test runs, input shown in green bold:
Enter any integer:
is an Achilles number.
Enter any integer:
is not an Achilles number.
Enter any integer:
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
