two given matrices the first step is to ensure the two matrices are the same size as required by the rules of matrix addition after verifying the sizesa new matrix object is created and its elements set by iterating over and summing the corresponding elements from the two sources the new matrix resulting from this operation is then returned the implementation of the remaining methodswhich is left as an exercisecan be done in similar fashion applicationthe game of life the game of lifedevised by british mathematician john conwayis solitairetype game that is analogous with "the risefall and alternations of society of living organisms the gamewhich is actually zero-player gamewas first introduced by martin gardner in his mathematical games column in the october issue of scientific american since its introductionlife has attracted much attention and has been widely studied as it can be used to observe how complex systems or patterns can evolve from simple set of rules the game of life was an early example of problem in the modern field of mathematics called cellular automata rules of the game the game uses an infinite-sized rectangular grid of cells in which each cell is either empty or occupied by an organism the occupied cells are said to be alivewhereas the empty ones are dead the game is played over specific period of time with each turn creating new "generationbased on the arrangement of live organisms in the current configuration the status of cell in the next generation is determined by applying the following four basic rules to each cell in the current configuration if cell is alive and has either two or three live neighborsthe cell remains alive in the next generation the neighbors are the eight cells immediately surrounding cellverticallyhorizontallyand diagonally living cell that has no live neighbors or single live neighbor dies from isolation in the next generation living cell that has four or more live neighbors dies from overpopulation in the next generation dead cell with exactly three live neighbors results in birth and becomes alive in the next generation all other dead cells remain dead in the next generation