/* 
John Oxford & Ryan Thompson & Joseph Lovins 
CS1301-A Programming Principles I
Dr. Youming Li (instructor)
Due 4/27/2006 (April 27, 2006)
Program created 4/24/2006 (April 24, 2006)
Filename is Student.java

	Compiling and running the program:

-First, extract the program (Tests.java & Student.java) to the C:\ directory
-Now to run the program you must enter the command prompt
-If your directory is not pointed to C:\, then change to it by typing "cd\"
-To compile the program you must input "javac Tests.java" & "javac Student.java"
-After the compilation is completed, run the program by typing "java Tests"

	Purpose and uses of the program:

This program lets the user enact sever options on a set of randomly assigned test
scores for 10 students. The student names are provided by the user via the
JOptionPane method when the program is first started. The user has four options that 
he or she can input into a dialog box. The first option is the ability to print out
the entire list of scores for each test of each student. The second option is the 
ability to sort the grades for a specific test in ascending order with reference
to which student scored what. The third option is the ability to sort the student
names in alphabetical order. The fourth allows the user to search a particular quiz for
a particular score that he or she both decides. Finally, the user can only correctly exit
the program by inputting the exit command inside the dialog box.
*/
import javax.swing.*;

class Student//the class where objects will be assigned
{
  String name="";//object name of datatype string
  int[] quiz = new int[6];//6 ints within an array object

  Student()
  {
    for(int i=0;i<quiz.length;i++)
      quiz[i] = (int)(Math.random( )*101);//assigns random scores

    name = JOptionPane.showInputDialog("Enter the student's name:");
    name = name.toLowerCase();
    // Takes in the name and then converts the string to all lower case
    // which allows all names to be equal in case
  }
  public void printout()
  {
  //the overall printout method
    System.out.println("------------------------------------------------"+
	"\nInformation for Student: "+this.name);

    for(int i=0;i<6;i++)
      System.out.println("\nTest " + (i+1) + " Score: " + this.quiz[i]);

    System.out.println("\n------------------------------------------------");
  }
}