The program will be doing input and output. Which of the Java packages should be imported?
java.io.*;
Here is the program with some additional work done on the "user prompting and looping" aspect:
import java.io.*;
class evalPoly
{
public static void main (String[] args ) throws IOException
{
BufferedReader userin = ___________________________;
double x; // a value to use with the polynomial
String response = "y"; // "y" or "n"
while ( response.equals( "y" ) )
{
// get a value for x
// evaluate the polynomial
// print out the result
// ask the user if program should continue
// the user's answer will be referenced by "response"
___________________________;
response = userin.___________________________;
}
}
}
|