Lab Assignment #1: Turtle Border
Date Assigned: Thursday, September 11, 2008
Due Date: Wednesday, September 17, 2008
Class Time Available: end of 9/11, 9/15, 9/17
 
Program Outline

Your task is to create an application program in BetterTurtle named "PageBorder" that will draw a border of circles around the page at the desired radius of the user.

You should use either EasyReader or a JOptionPane.showInputDialog(String msg) (showInputDialog API) to first get the desired radius from the user. Ask for AND ENSURE that the user enters a radius between 10 and 25 inclusive. If they do not, continue asking until they do. (What kind of looping structure would work best here?)

Once you have the radius, create a new "special" Turtle using the 3 parameter constructor. What makes this Turtle special is that the dimensions of the world it creates will be multiples of the radius.

You are to make the width of the world a multiple of the radius between 660 and 760 and the height should be between 500 and 600. The reason for this is to ensure that the circles will be able to evenly border the page.

Your program should compile and run without error, nor should it place a circle over one that it has already made.

EXTRA CREDIT LEVEL 1 - Using Arrays/ArrayList - 'PageBorderEC1'
Give the user a list of color names (the possible colors a Turtle can have) and use a looping structure to allow the user to choose the colors they would like the Turtle to use to form a pattern. When they are done choosing colors, they should enter the word "Quit" and program execution continues, this time changing the color repeatedly (unless they only enter one color.)

EXTRA CREDIT LEVEL 2 - Increasing Program Versatility to Customize User Experience - 'PageBorderEC2'
Once the user enters their desired radius, supply the user with a list of possible screen size options. Rather than show each combination (there could be a lot!) first get the desired width from the user, then the desired height. Use these in the Turtle constructor.

EXTRA CREDIT LEVEL 3 - Defining a Circle Class and Increasing Program Appeal - 'PageBorderEC3'
Once the radius and screen size is determined, populate a list (your choice of implementation) with the coordinates of every circle's center and that circle's color. You will need to create a Circle class to do this with three instance variables: x, y, and color. The list will be of the Location type. Then, using a Random number generator, make the circles appear on the border randomly (therefore using a delay and not going 'straight around') and ensure that when the final circle appears, the color pattern is as desired by the user.

 
GRADING - This assignment is worth 50 points.
Performance Points
Program ensures that user-entered radius is in correct range. 8
The world is created at an appropriate screen size. 8
The border is correctly created. 24
Style and documentation are correct and provided. 10
Extra Credit Levels (each - for successful completion) +5
Design Concerns
When making the application program, think about making it simply the driver of the program - but putting all of the pieces into short methods. While efficiency is not part of the grade for the first lab of the year, it should be in the back of your mind as you design your class.