public class Recursive
extends java.lang.Object
Modifier and Type  Field and Description 

static int 
BOARD_SIZE
The size of the Sudoko board.

static int 
MINI_SIZE
The size of a mini marix on the Sodoko board.

Constructor and Description 

Recursive() 
Modifier and Type  Method and Description 

boolean 
canFlowOffMap(int[][] map,
int row,
int col)
Problem 8: Determine if water at a given point
on a map can flow off the map.

void 
drawCarpet(int size,
int limit)
Problem 6: Draw a Sierpinski Carpet.

void 
drawTriangles(int windowSize,
int minSideLength,
int startingSideLength)
Problem 5: Create a DrawingPanel and place Sierpinski triangles in it.

java.lang.String 
getBinary(int n)
Problem 1: convert a base 10 int to binary recursively.
pre: n >= 0 post: Returns a String that represents N in binary. 
int[][] 
getSudokoSolution(int[][] startBoard)
Problem 7: Find a solution to a Sudoko puzzle.

java.util.ArrayList<java.lang.String> 
listMnemonics(java.lang.String number)
Problem 4: Find all combinations of mnemonics for the given number.
pre: number != null, all characters in number are digits post: see tips section of assigment handout 
int 
minDifference(int numTeams,
int[] abilities)
Problem 9: Find the minimum difference possible between teams
based on ability scores.

int 
nextIsDouble(int[] data)
Problem 3: Returns the number of elements in data
that are followed directly by value that is
double that element.

java.lang.String 
revString(java.lang.String stringToRev)
Problem 2: reverse a String recursively.
pre: stringToRev != null post: returns a String that is the reverse of stringToRev 
public static final int BOARD_SIZE
public static final int MINI_SIZE
public java.lang.String getBinary(int n)
n
 the base 10 int to covnert to base 2public java.lang.String revString(java.lang.String stringToRev)
stringToRev
 the String to reverse.public int nextIsDouble(int[] data)
public java.util.ArrayList<java.lang.String> listMnemonics(java.lang.String number)
number
 The number to find mnemoics forpublic void drawTriangles(int windowSize, int minSideLength, int startingSideLength)
windowSize
 > 20minSideLength
 > 4startingSideLength
 > minSideLengthpublic void drawCarpet(int size, int limit)
size
 the size in pixels of the windowlimit
 the smallest size of a sqauer in the carpet.public int[][] getSudokoSolution(int[][] startBoard)
startBoard
 The starting board.
Empty values = 0, given values = 1 through 9 may not be changedpublic boolean canFlowOffMap(int[][] map, int row, int col)
row
 The starting row of a drop of water.col
 The starting column of a drop of water.public int minDifference(int numTeams, int[] abilities)
numTeams
 the number of teams to form.
Every team must have at least one memberabilities
 the ability scores of the people to distribute
The return value will be greater than or equal to 0.