arrays figure the game grid representation with live and dead cells(leftthe abstract view and (rightthe physical view using - array of ' and ' value for the live cells this choice is based on the ease it creates when counting the number of neighbors for given cell figure illustrates the abstract and physical views of the game grid the lifegrid class is implemented in listing at the top of the class definitionbefore specifying the constructortwo constant variables are initialized to store the values used to mark the cells within the game grid these constants are defined within the class itself and outside of the methods since they are not actual data fields of lifegrid object by using the named constantsthe code is easier to read and the values used to represent the cell status could easily be changed if we were so inclined the constructorshown in lines - creates - array for the grid using the array class defined earlier in the the cells are cleared as the adt definition requires by calling the configure(method with an empty coordinate list the grid dimension accessor methods are easily implemented using the corresponding methods of the array class the three cell modification routines are also straightforward note that the adt definition requires the cell indices specified for the clearcell(and setcell(methods must be valid since this is also the precondition required of the array element access methodswe omit the direct specification of assertions in these methods the configure(methodshown in lines - clears the grid cells by setting each to dead organism it then iterates through the coordinate list and uses the setcell(method to set the live cells the numliveneighbors(method is left as an exercise notehoweversince we used the integer values and to represent the state of cellcounting the number of live neighbors is as simple as summing the contents of the neighboring cells working with fixed-size grid introduces the problem of how to deal with the cells around the border border cell will not have all eight neighbors since some of them lie outside the grid different approaches can be taken when border cell note constant variables constant variables defined within class are actually class variables that are unique to the class and not to individual objects to reference class constant variableuse the name of the class in place of the self keyword ( printgamegrid dead celli