February 2010

Making a Fractal in Java’s Console

February 21, 2010

From, Data Structures and Other Objects Using Java, Chapter 8, Project #9, page 440: Examine this pattern of asterisks and blanks and write a recursive method that can generate exactly this pattern: * * * * * * * * * * * * * * * * * * * * * * * [...]

Read the full article →

Simulating a Car Wash in Java

February 21, 2010

From, Data Structures and Other Objects Using Java, Chapter 7, Project #8, page 396: Make improvements to the car was simulation program from Section 7.2. Note: Portions of code taken from Michael Main’s version. WARNING: Cheating is bad, mmmmkay children? Don’t cheat. /* | Bryan Simonson \ CS211 – Craig Niiyama | 2/21/2010 */ // [...]

Read the full article →

Solving the n-Queens Problem in Java

February 21, 2010

From Data Structures and Other Objects Using Java, Chapter 6, Project #10, Page #347: Suppose that you have n queens from a chess game, and that you also have an n-by-n chess board. Is it possible to place all n queens on the board so that no two queens are in the same row, no [...]

Read the full article →