diff --git a/Checkstyle.xml b/Checkstyle.xml index 6cf2192..36dbd1f 100644 --- a/Checkstyle.xml +++ b/Checkstyle.xml @@ -1,85 +1,111 @@ + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> + - + - + - + + - + - + + + + + - - + + + - + - + - + - + + + + + + + + + + + + + + + + + + + - + + + + - + - + + @@ -92,42 +118,38 @@ Checkstyle configuration for Think Java, 2nd Edition. - + - - + - + + + - - - + + - + diff --git a/Formatter.xml b/Formatter.xml index f97740d..ab6e68e 100644 --- a/Formatter.xml +++ b/Formatter.xml @@ -1,318 +1,390 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ch15/Cell.java b/ch15/Cell.java index d468b6d..5b6a0f9 100644 --- a/ch15/Cell.java +++ b/ch15/Cell.java @@ -3,6 +3,9 @@ /** * A square at a fixed location that changes color. + * + * @author Chris Mayfield + * @version 7.1.0 */ public class Cell { @@ -40,28 +43,32 @@ public void draw(Graphics g) { } /** - * @return true if the cell is OFF + * Tests whether the cell is off. + * + * @return true if the cell is off */ public boolean isOff() { return state == 0; } /** - * @return true if the cell is ON + * Tests whether the cell is on. + * + * @return true if the cell is on */ public boolean isOn() { return state == 1; } /** - * Sets the cell's state to OFF. + * Sets the cell's state to off. */ public void turnOff() { state = 0; } /** - * Sets the cell's state to ON. + * Sets the cell's state to on. */ public void turnOn() { state = 1; diff --git a/ch15/Conway.java b/ch15/Conway.java index 93faf28..5ac48c6 100644 --- a/ch15/Conway.java +++ b/ch15/Conway.java @@ -2,6 +2,9 @@ /** * Conway's Game of Life. + * + * @author Chris Mayfield + * @version 7.1.0 */ public class Conway { @@ -109,8 +112,6 @@ public void update() { /** * The simulation loop. - * - * @param rate frames per second */ private void mainloop() { while (true) { diff --git a/ch15/GridCanvas.java b/ch15/GridCanvas.java index c936135..3856a57 100644 --- a/ch15/GridCanvas.java +++ b/ch15/GridCanvas.java @@ -3,6 +3,9 @@ /** * 2D array of cells representing a rectangular grid. + * + * @author Chris Mayfield + * @version 7.1.0 */ public class GridCanvas extends Canvas { @@ -33,6 +36,8 @@ public GridCanvas(int rows, int cols, int size) { } /** + * Gets the number of rows. + * * @return number of rows */ public int numRows() { @@ -40,6 +45,8 @@ public int numRows() { } /** + * Gets the number of columns. + * * @return number of columns */ public int numCols() { @@ -47,6 +54,8 @@ public int numCols() { } /** + * Gets the cell at index (r, c). + * * @param r row index * @param c column index * @return the cell diff --git a/user.dict b/user.dict new file mode 100644 index 0000000..11b2406 --- /dev/null +++ b/user.dict @@ -0,0 +1,2 @@ +chris +mayfield