Due: Tuesday 4/22 10:00am

Submission name: w16_wordGrid

a16-wordgrid

Word Searching!

Over the next few days we will be creating a word search program, the core of this will be the class WordGrid, which will contain a 2D array of char values, as well as other necessary fields. To start, write the WordGrid class as follows:

  • Fields
    • char[][] grid
    • int size
    • More to be added later
  • Methods
    • WordGrid(int s)
      • Set size to s.
      • Initialize grid to be a size x size array.
      • Call fillGrid()
    • void fillGrid()
      • Fill grid with random upper case letters.
    • void drawGrid
      • Display the contents of grid on the screen, taking up the full size.

Write a driver file that:

  • Sets global constants for the size of each displayed character and the size of the word grid.
  • Sets the screen size to exactly fit the word grid.
  • Creates a new word grid using the size global variable.
  • Tests drawGrid.