This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acm.graphics.*; | |
import acm.program.*; | |
import acm.util.*; | |
import java.awt.*; | |
public class Hangman_II extends ConsoleProgram { | |
public HangmanLexicon lexicon = new HangmanLexicon(); // creates an object of type HangmanLexicon | |
private final static int N_HANGMAN_PARTS = 8; // number of parts to draw to complete hangman drawing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acm.program.*; | |
public class String_Methods extends ConsoleProgram { | |
public void run() { | |
while (true) { | |
String digits = readLine("Enter a numerical string: "); | |
if (digits.length() == 0) break; | |
println(addCommasToNumericString(digits)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: Breakout.java | |
* ------------------- | |
* Name: | |
* Section Leader: | |
* | |
* This file will eventually implement the game of Breakout. | |
*/ | |
import acm.graphics.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acm.graphics.*; | |
import acm.program.*; | |
import acm.util.*; | |
public class randomCircles extends GraphicsProgram { | |
// specifies number of circles | |
private static final int NCIRCLES = 10; | |
// specifies minimum radius | |
private static final int RMIN = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acm.graphics.*; | |
import acm.program.*; | |
import java.awt.*; | |
public class robotFace extends GraphicsProgram { | |
private static final double HEAD_WIDTH = 200; | |
private static final double HEAD_HEIGHT = 350; | |
private static final double EYE_RADIUS = 30; | |
private static final double MOUTH_WIDTH = 110; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acm.program.*; | |
// this program prints the fibonacci sequence | |
public class sectionAssignment_2 extends ConsoleProgram { | |
// specifies max value for term in fibonacci sequence | |
private static final int MAX_TERM_VALUE = 10000; | |
public void run() { | |
introduction(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: Hailstone.java | |
* Name: | |
* Section Leader: | |
* -------------------- | |
* This file is the starter file for the Hailstone problem. | |
*/ | |
import acm.program.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: FindRange.java | |
* Name: | |
* Section Leader: | |
* -------------------- | |
* This file is the starter file for the FindRange problem. | |
*/ | |
import acm.program.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: PythagoreanTheorem.java | |
* Name: | |
* Section Leader: | |
* ----------------------------- | |
* This file is the starter file for the PythagoreanTheorem problem. | |
*/ | |
import acm.program.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: ProgramHierarchy.java | |
* Name: | |
* Section Leader: | |
* --------------------------- | |
* This file is the starter file for the ProgramHierarchy problem. | |
*/ | |
import acm.graphics.*; | |
import acm.program.*; |