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
For this lab assignment, complete the following:
For this lab, take the star shape from lab 9 and repeat it multiple times so it is looks something like:
The star should be drawn at least 8 times. You can draw it more than 8 times if you wish.
If you didn't get lab 9 working, the code that could have been used in lab 9 to draw the 5 pointed star is as follows:
// Create a world World world = new World(false); Turtle turt = new Turtle(world); turt.turn(18); // Draw a pentagram int loopCount; loopCount = 0; while (loopCount < 5) { turt.forward(100); turt.turn (144); loopCount++; } world.show();
Be sure to change comment with the name of the author to contain the following:
To use the UNIX turnin command to electronically hand-in your html file using the project name of lab10. To submit the file in <filename> for lab10, the turnin command is entered as:
turnin -c cs101 -p lab10 <filename>To verify what you submitted using the turnin command type:
turnin -c cs101 -p lab10 -v