Java

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 →

PseudoRandom Number Generation in Java

January 20, 2010

Assignment number 1 in CS211 (Java) programming class. (No stealing! I want full point on my grade!) PseudoRandomDemo.java /* | Bryan Simonson \ CS211 – Craig Niiyama | 1/19/2010 */ package bryansimonson; import bryansimonson.PseudoRandom; /** * @author Bryan Simonson (manticor@gmail.com) */ public class PseudoRandomDemo { /** * The main function generates a table that counts [...]

Read the full article →
Private