CS 101 - Intro to Computing, Spring 2008

Lab 9

Java Programming

When doing Java Programming,it is very important to follow a basic Java Template. Below is a file called Template.java

/**
 * 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 Template 
{
  
  public static void main (String[] args) 
  {
    System.out.println("Begin Java Exection");
    System.out.println("");


    // put your Java Program here


    System.out.println("");
    System.out.println("End Java Exection");
  }
} // end of Template class

Lab Assignment

Due: Tuesday 3/18/2008 by 11:59 pm

For this lab assignment, complete the following:

  1. Using the file MyTurtleTest.java as a starting point, modify the program so that it creates out a 5 pointed star as shown below:

    Think about the geometry of the diagram to determine the angles for each turn.

    Be sure to change comment with the name of the author to contain the following:

  2. You are also to submit the Java file electronically by using the UNIX turnin command.

    To use the UNIX turnin command to electronically hand-in your html file using the project name of lab9. To submit the file in <filename> for lab9, the turnin command is entered as:

         turnin -c cs101 -p lab9 <filename>
    
    To verify what you submitted using the turnin command type:
         turnin -c cs101 -p lab9 -v
    

Grading Criteria