Write a program that prints the powers of ten
1.0
10.0
100.0
1000.0
10000.0
100000.0
1000000.0
1.0E7
1.0E8
1.0E9
1.0E10
1.0E11
Implement a class
public class PowerGenerator
{
/**
Constructs a power generator.
\@param aFactor the number that will be multiplied by itself
*/
public PowerGenerator(double aFactor) { . . . }
/**
Computes the next power.
*/
public double nextPower() { . . . }
. . .
}
Then supply a test class PowerGeneratorRunner that calls System.out.println(myGenerator.nextPower()) twelve times.