Your goal is to have Karel create a pile of 100 beepers on square infront of where she starts. Please!!! Do not type out putBeeper 100 times in a row! (hint: use a for loop.)

Solution

/**
 * Program: Place100
 * -------------
 * This program makes karel place a pile of 100 beepers. Good times.
 */
public class Place100 extends SuperKarel {
	
	public void run() {
		move();
		place100();
		move();
	}

	/**
	 * Method: Place 100
	 * -----------------
	 * Puts 100 beepers on the current square
	 */
	private void place100() {
		// This for-loop will repeat the code inside 100 times.
		for(int i = 0; i < 100; i++) {
			putBeeper();
		}
	}
}