import java.util.ArrayList; /** * Represents one Cell in Conway's Game of Life. */ public class Cell { /** true if this Cell is alive; false if it is dead. */ private boolean alive; /** Constructs a dead Cell. */ public Cell() { // TODO Task 1 alive = false; } /** * Constructs a Cell with the specified state. * @param status true for alive; false for dead */ public Cell(boolean status) { // TODO Task 1 alive = false; } /** @return true if this Cell is alive; false otherwise */ public boolean getAlive() { // TODO Task 1 return false; } /** @param status the new state of this Cell */ public void setAlive(boolean status) { // TODO Task 1 } /** * Updates this Cell according to Conway's Game of Life rules. * Use the supplied neighbors to count how many neighboring Cells are alive. * * @param neighbors the neighboring Cells from the current generation */ public void updateState(ArrayList neighbors) { // TODO Task 4 } /** * @return "1" if this Cell is alive; otherwise "0" */ public String toString() { // TODO Task 1 return ""; } /** * Use this method to experiment with Cell objects before running CellTester. */ public static void main(String[] args) { // Add your own experiments here. } }