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 ETest10) 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 72,108,200,288.
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 8 is a perfect power as it can be computed by raising 2 to the power 3(i.e.8=2**2**2). The first powerful numbers are 1,4,8,9,16,25,27,32.
boolean isPowerful( int number) which returns whether the passed number is a powerful number. An integer n is called powerful if, for every prime p dividing evenly into n,p**p also divides evenly into n. For example 8 is a powerful number as the only prime which divides evenly into it is 2 and 2**2=4 which also divides evenly into 8. The first powerful numbers are 1,4,8,9,16,25.
int[] getPrimeFactors( int number) which returns an array containing the prime factors of the passed number, in ascending order. E.g.
if passed 15 it will return [3,5], as 15=3**5 and 3&5 are primes. if passed 28 it will return [2,2,7, as 28=2**2**7 and 2&7 are primes.
if passed 7 it will return [7], as 7 is a prime already.
if passed any number 1, it will return null.
Example interaction (3 separate test runs, input shown in green bold):
Enter any integer:
72
72 is an Achilles number.
Enter any integer:
16
16 is not an Achilles number.
Enter any integer:
3.14
Error in input. You needed to supply integer values.
Write a Java program ( called ETest 1 0 ) which

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 Programming Questions!