UPDATED ACTUAL Exam Questions and
CORRECT Answers
What are the four valid commands Karel knows? - CORRECT ANSWER - -move();
-turnLeft();
-putBall();
-takeBall();
Which of these is a valid Java Karel command?
A.) move();
B.) move;
C.) move()
D.) move(5) - CORRECT ANSWER - A.) move();
What are rows known as in Karel's world? - CORRECT ANSWER - Streets
What are the columns known as in Karel's world - CORRECT ANSWER - Avenues
If Karel starts at Street 1 and Avenue 3 facing East, what row and column will Karel be on after
this code runs?
move();
move();
,move();
turnLeft();
move(); - CORRECT ANSWER - Street 2 and Avenue 6
How do you write a Java Class? - CORRECT ANSWER - public class SquareKarel
extends Karel
{
}
What is the Run Method? - CORRECT ANSWER - The place where our program starts
running
public void run()
{
}
How do you write a Java Class with Run Method? - CORRECT ANSWER - public class
SquareKarel extends Karel
{
public void run ()
{
// our code goes here
}
}
What is the run method in a Java program with Karel?
, A.) A method that always makes Karel move in a square.
B.) The method that is called just before the program ends.
C.) The method that is called to start a Karel program.
D.) The method that is called in order to move Karel one space forward. - CORRECT
ANSWER - The method that is called to start a Karel program
What does a Karel run method look like?
A.) public run()
{
//code
}
B.) public run(){
//code
}
C.) public void run
{
//code
}