Greatest product in Grid (due 04 August 2013)

This assignment is a variation of a problem from Project Euler. You are required to find the greatest product of four adjacent numbers in the same direction (horizontal, vertical, or diagonal) in a grid of positive integers.

You will read your input from the file grid.txt . The first line indicates n the dimension of the grid. This will be followed by n lines of data. Each line of data will have n positive integers.

You will have a single line of output:

The greatest product is 70600674.

For this assignment you may work with a partner. Both of you will have to read the paper on Pair Programming . The two of you will jointly work on this assignment and submit a single copy of the assignment with both your names on it.

The file that you will be turning in will be called You will follow the standard Java coding convention that I have appended below. The file will have a header of the following form:



  Student Name:

  Student UT EID:

  Partner Name:

  Partner UT EID:

  Course Name: CS 312

  Unique Number: 

  Date Created:

  Date Last Modified:


You will follow the standard Java Coding Conventions. You can either view the HTML page or download the PDF or Postscript and print it out. There is a modification that I would like to make to the standard coding conventions. Please align the opening and closing braces vertically so that you can easily make out the blocks of code. For example:

Do this:
if ( x > 5 )
  a = b + c;

Not this:
if ( x > 5 ) {
  a = b + c;

Use the turnin program to submit your file. We should receive your work by 11 PM on Sunday, 04 August 2013. There will be substantial penalties if you do not adhere to the guidelines.