Lab 7 CS100M Spring 2004 Due Friday, Mar 19, 23:59 pm 1) Answer questions about Prelim 2 [about 10 min]. 2) Java at the command line a) Refer to Applications in first Java lecture notes (see Section 2) b) open a DOS window (Start->Run, enter cmd) (see Section 2.1) c) Find the Java SDK in the C drive d) Download HelloWorld program from lecture notes (rename extension from txt to java) e) Based on the name and location of the Java SDK compile and run your HelloWorld.java program at the command prompt. See Section 2.4. f) Do the steps in 2.4.1. In a public lab, the settings might not stick. But even if temporary, they make compiling and running much simpler. g) Assuming step f worked, compile and run your HelloWorld.java program using the commands in Sections 2.5 and 2.6. 3) Dr Java *Most* labs have the software, but not all. If your lab does not have Dr Java, create the following program using a text editor and test at the command prompt. In Dr Java, write a new program called e7sol.java that does the following: - Declares two variables x and y as integer types. - Assigns 2 to x and 3 to y. - Outputs the result of comparing x to y. - Declares a new double variable z and prompts the user to input a value for z. You will need to download SavitchIn.java (see Exercises). The method you will use is SavitchIn.readLineDouble() This method prompts the user to input a floating-point number. However, the programmer must supply the actual prompt with System.out.print() or System.out.println(). - Adds z to x and outputs the result. Be sure to compile and test your program in Dr Java (or at the command line). 4) Submit a correct version of e7sol.java as your solution to E7.