//File:	TestTable1.java
import CSLib.*;
public class TestTable1
{
	public static void main (String [] args)
	{
		int [] [] score;
		
		InputBox in = new InputBox();
		in.setPrompt ("How many students are enrolled? ");
		int students = in.readInt();
		
		in.setPrompt ("How many quizzes were given? ");
		int quizzes = in.readInt();
		
		score = new int [students] [quizzes];
		
		for (int student = 0; student < students; student++)
		{
			in.setPrompt ("Enter scores for student " +  (student+1));
			for (int quiz=0; quiz < quizzes; quiz++)
			{
				score [student] [quiz] = in.readInt();
			}
		}
		
		OutputBox out = new OutputBox();
		out.setSize(300, 200);
		
		//The following sets up the headers for the table
		out.println ("The gradebook is as follows: ");
		out.print ("Quiz\t");
		for (int k=1; k<=quizzes; k++)
		{
			out.print (k + "\t");
		}
		out.println();
		out.println();
		
		//Choose either of the table display methods
		//NumberList.display (out, score);
		NumberList.display (out, score, students, quizzes);
	}
}
