
CIS 120-101 / Overstreet / Fall 2007
Lab 1 - Due Week 1/Class Meeting 2 (Wed 8/22/07)
Objectives:
(1) Make sure students have a laptop (they should bring it with them to the lab).
(2) Make sure students have JDK and JGrasp loaded onto their laptops.
(3) Have students create a “java” directory. Suggest: C:\java!
(4) Make sure students know how invoke Jgrasp.
(5) Make sure students know how to type in program, make editing changes, and
compile/edit program.
Two programs will be used to do this.
(A) traditional Hello World that uses System.out.print and println.
(B) A program with a JOptionPane (input of a number) and output.
Program A: call this one “HelloWorld.java” when you save it. (Note: do NOT type in the line
numbers shown below when you type in the program. They are added here only for discussion
purposes).
1. // Author : Your Name here.
2. // Student Number : Your student number here.
3. // Date Submitted : August ?, 2007
4. // File : HelloWorld.java
5. // Instructor : My name here.
6. // Class : CIS 120 (time of class here)
7. // Identification : Lab 1.
8. // Purpose : fill in...
9. // fill in...
10.// fill in...
11. // Imported Packages/Classes
12. // None for this program.
13. public class HelloWorld {
14. public static void main (String[] args) {
15. System.out.print("Hello ");
16. System.out.println("World");
17. } // main
18. } // class: HelloWorld