Hi,

I have the following assignment:
"Write a Java application program using Eclipse to do the following. Write a program that contains 5 Java classes, each in their own file. The first class is called Main and contains the main method that runs the program. The main method will simply create an instance of the second, third, fourth, and fifth classes to run the program.
The second class will contain a method that has a potential infinite while loop. Code in the while loop will print 1 to 5 on the Eclipse Console screen in increments of 1, but will skip number 3.
The third class will contain a constructor that initializes variables and invokes methods to perform the first part of the program algorithms. This third class also contains a method to calculate equations. It is an overloaded method. The first version of the method takes an x value and the degree of a polynomial and calculates and returns the value of the polynomial for the x value using a method from the Math class. The degree is hard-coded at 3, which is placed in a location just before the method is invoked (called). All the equation coefficients are 2.0 and are hard-coded within the method. The resulting equation is: y = 2.0 + 2.0X + 2.0X2 + 2.0X3
Use a for loop to calculate the polynomial.
The second version of the method takes the x value and a desired power of x and calculates and returns that value. This version also uses the Math class. The equation power is hard-coded at 2.5, which is placed just before the method is invoked. The coefficient is also hard-coded at 1.5 and z is 2 times x, the value used in the polynomial. The resulting equation is:

Y = 1.5Z 2.5

The value of x needs to be input from the keyboard. The program output for this part is the equation calculation for both the polynomial and the power equation. The input x value should also be displayed in the output along with labels to differentiate between the calculated values. The output is to be placed on the Eclipse Console screen.
The fourth class within the program calculates the cost it takes to build several units of a product. It contains a constructor that invokes a method that calculates the cost. The cost method needs the average time to build a unit. This time is calculated in another method that is invoked in the cost method. The time method contains hard-coded values for the number of parts (1000) within the unit and the average number of hours required to fabricate each part (10.14). It returns the time required to build one unit. The cost method contains a hard-coded average dollar per hour of $87.50. It also takes as an argument the number of units on which to calculate the cost. The cost method returns void. The number of units (10) is input from the keyboard.The output from this portion of the program is printed on the same Eclipse Console screen as the first part. It shows the number of units, the cost per unit, and the cost for all the units, all properly labeled.
The fifth class in the program converts a whole number in the decimal system to the string representation of its binary equivalent using a recursive method. The input is from the keyboard, and the result of the conversion is confirmed using a method of the Integer class. The output is on the same Eclipse Console screen as the other parts.

A convenient way to convert a number in the decimal system to a binary number is to repeatedly divide quotients by 2 using integer division. If the quotient is an even number then the binary numeral is 0; if odd the numeral is 1. Taking the number modular 2 and each successive quotient modular 2 provides the 0 or 1. The number modular 2 gives the numeral for position 0 (20), the first quotient modular 2 the second position 1 (21), etc. "

I am stuck at second Class for the Polynomials. The other 3 classe I manged to do, but I can understand how to use For Loop for the second class?

Thanks