Thursday, December 16, 2010

Tuesday, December 7, 2010

Sunday, November 28, 2010

Tuesday, November 16, 2010

Thursday, November 4, 2010

Thursday, October 21, 2010

Thursday, October 14, 2010

Thursday, October 7, 2010

Towers of Hanoi












public class TowersOfHanoi
{
private int numDisks;

public TowersOfHanoi( int disks )
{
numDisks = disks;
}

public void solveTowers( int disks, int sourcePeg, int destinationPeg, int tempPeg)
{
if(disks == 1)
{
System.out.printf("\n%d --> %d", sourcePeg, destinationPeg);
return;
}

//recursion step -- move (disk - 1) disk from sourcePeg
//to tempPEg using destinationPeg
solveTowers(disks - 1, sourcePeg, tempPeg, destinationPeg );

//move last disk from sourcePeg to destinationPeg
System.out.printf( "\n%d --> %d", sourcePeg, destinationPeg );

//move (disks - 1) disks from tempPeg to destinationPeg
solveTowers( disks - 1, tempPeg, destinationPeg, sourcePeg);
}
}



public class TowersOfHanoiTest
{
public static void main( String args[] )
{
int startPeg = 1;
int endPeg = 3;
int tempPeg = 2;
int totalDisks = 3;
TowersOfHanoi towersOfHanoi = new TowersOfHanoi( totalDisks );

towersOfHanoi.solveTowers( totalDisks, startPeg, endPeg, tempPeg );
}
}

Binary Search Test

Sunday, September 5, 2010

Wednesday, May 26, 2010

Code

Thursday, May 20, 2010

Wednesday, May 5, 2010

Monday, March 22, 2010

All Past Assignments

This was done at our first class meting back in January.




















Monday March 22, 2010

Today we are working on Blogs and how to get some dinero off of them. So much of dinero that you can make 3 - 5k a month just by writing about what you love and what you are good at. Sounds like a win-win to me!