EECS 370 - Java GUI: "RandomTester"

Machine Problem 5

Due date: Thursday December 2, 1999 at 11:59 pm

For this program, you are to write a Java Application using the Java 2 library. This program is to provide a graphical method to test random number generators. The program is to plot points were both the x and y coordinate were generated from a random number generator. After a large number of points have been plotted, if a pattern appears on the plot then the "random number generator" is not so random. The name of the class that you are creating must be RandomTester.

Your program is to allow the usage of the Math.random() method as well as the following methods in the Random class.

This gives a total of six random number generators. You can add up to three more random number generators of your choosing for an additional 5 points extra credit each (for a total of 15 points extra credit). These additional random number generators can be called through libraries or have the code included in your program.

The GUI for your program will have to have the following elements:

  1. A drawing area to display the points.
  2. A button that clears the drawing area of all displayed points.
  3. An input field so the user can express how many points are to be drawn. The default number of point is to be 250 points.
  4. A draw button that will draw however many points as the input field dictates.
  5. A selection list that allows the user to select which random number generator is to be used for the creation of the points. The default random number generator is to be Math.random().
  6. An about button that gives information about the author of the program.

Your program must be written in good programming style. This includes (but is not limited to) meaningful identifier names, a file header at the beginning of each source code file, a function header at the beginning of the function, proper use of blank lines and indentation to aide in the reading of your code, explanatory "value-added" in-line comments, etc.

The work you turn in must be 100% your own. You are not allowed to share code with any other person (inside this class or not). You may discuss the project with other persons; however, you may not show any code you write to another person nor may you look at any other person's written code.

You are also to write a one to two page program description. This write up must be submitted with your program and be in ASCII text format. This description is to explain your internal data structures, code structures and the algorithms used in your program. Remember, this program description will be read by another student when the critiques are done for this assignment. Often the title of "readme" is used for these types of documents.

You are to submit this project using the EECS Department's UNIX machine's turnin command. The project name for this assignment is mp5. Be sure to submit all source code and header files as well as your program description. Failure to turnin all required pieces will result in a lower grade for the assignment.

For this assignment, you can get extra credit for turning it in early.
Turned in byGet this extra credit
Tuesday 11/30/99 by 11:59 pm5
Sunday 11/28/99 by 11:59 pm * 10
Friday 11/26/99 by 11:59 pm * 15
Wednesday 11/24/99 by 11:59 pm20
* If the system goes down over break, these days will not be available.