/** * Class for creating a template for a simple Java program * * @author Pat Troy: troy AT uic DOT edu */ // Note the name of the class in the following line MUST // match the name of the file. This is stored in a file // named: Template.java public class Lect99a { public static void main (String[] args) { System.out.println("Begin Java Exection"); System.out.println(""); // put your Java Program here int userInput; userInput = 0; SimpleOutput.showInformation ("We are trying to solve the equation of: \n\n" + " x = 3y^2 - 5y + 10 \n\n" + "for any value of y the user might enter."); userInput = SimpleInput.getIntNumber ("Enter an integer value for y"); SimpleOutput.showInformation ("The user entered the value of " + userInput); // calculate the value for x int y = userInput; int ySquaredTerm; int yToTheFirstTerm; int x; ySquaredTerm = (y * y) * 3; yToTheFirstTerm = 5 * y; x = ySquaredTerm - yToTheFirstTerm + 10; SimpleOutput.showInformation ("The resulting value of x is " + x); System.out.println(""); System.out.println("End Java Exection"); } } // end of Template class