Here I have a program called Connect4Model. Basically what the problem is that I have successfully compiled the program in TextPad. However when I run the program it throws up an Exception in thread "main" error. I fully understand what this error is, and it basically means that I'm missing the main method as shown below. However what I can see is how I can implement this. If there is a possible solution this would be great.
Thanks
public main void (Static [] args)
public class Connect4Model
{
Connect4Column [] columns;
int my_array[];
private int NUM_COLUMNS;
private int NUM_ROWS;
private int playerToGoNext = Connect4Column.RED_COUNTER;
Connect4Model(int numCols, int numRows)
{
columns = new Connect4Column[NUM_COLUMNS];
for (int i = 0;i < NUM_COLUMNS;i++)
{
columns[i] = new Connect4Column(NUM_ROWS);
}
}
int getNumCols()
{
return 0;
}
int getNumRows()
{
return 0;
}
int getNextPlayer()
{
return 0;
}
boolean go(int thisColumn)
{
if ( thisColumn < 0 || thisColumn >= NUM_COLUMNS)
{
return false;
}
else if(my_array[thisColumn] >= NUM_ROWS)
{
return false;
}
else
{
my_array[playerToGoNext]++;
return true;
}
}
int getCounter(int thisColumn, int thisRow)
{
return 0;
}
int getNumCounters(int thisColumn)
{
if(thisColumn >= 0 && thisColumn < NUM_COLUMNS)
{
return my_array[thisColumn];
}
else
{
return 0;
}
}
}