Computer Math Test #1
Terms in this set (59)
The java file that you write
compiling of the source code creates
interprets or runs the byte code (JVM)
Java Virtual Machine
What does it mean to say that Java is portable, or platform independent?
that you can compile once and run anywhere
What does // mean?
What does "import edu.fcps.karel2.Display" mean?
importing the Display class
What does "import edu.fcps.karel2.Robot" mean?
importing the Robot class
From what package is "import edu.fcps.karel2.Robot" ?
How many methods does Lab00 define?
What is the name of the method being defined in Lab00?
On what line number does the main method begin?
On what line is the method header?
On what line is the opening curly brace for the main method?
On what line is the closing brace for the main method?
On what line does the class Lab00 begin?
On what line is the opening curly brace for the class Lab00?
On what line is the closing curly brace for the class Lab00?
In which direction are the avenues positioned?
In which direction are the streets positioned?
Class methods are called through the__________ name.
List the 3 class methods utilized in lab00.
openWorld, setSize, setSpeed
Instance methods are called through the ________ name.
List the 4 instance methods utilized in lab00. (Commands)
move, turnLeft, pickBeeper, putBeeper
The object name karel is an instance of the ________ class.
List the 6 keywords found in lab00.
public, import, new, main, class, void, static, Lab00, string
List the 4 class names found in lab00.
Robot, Display, String, Lab00
Class names can be easily identified because they always start with a __________.
Command to create a new Robot object called henry (using the default constructor).......
Robot henry = newRobot();
Default constructor location, direction, and how many beepers......
(1,1), east, 0 beepers
What are 4 Robot INSTANCE methods that henry can call?
move, turnLeft, putBeeper, pickBeeper
Write the commands necessary to move henry 2 times, pick up a beeper, turn left, and then move once more......
Command to create a robot object named george starting at (3,5), facing west, carrying one beeper.......
Robot george = newRobot(3,5,Display.WEST,1)
Origin is at.....
When you run a Java application what method is the only method called automatically?
main method header......
public static void main(String args)
When you write a Java file, it is always saved with what extension?
After your source code has been compiled successfuly, the compiled program (or byte code) is then saved into a file with what extension?
What is an identifier?
Unique name of a class, an object, or a method.
EX: Robot (class), main (method), karel (object)
What are the rules for identifiers? Specifically, what can they contain?
What must they begin in?
What are the exceptions?
can contain unique sequence of number's, letters, and the underscore character "__".
create an instance of a class
send a message
the80s_, karel, void, pretty_In_Pink, main
Give command to give size of robot-world......
Misspelling a word in a Java file would produce what kind of compile-time error?
Missing a semicolon or parenthesis would produce what kind of compile-time error?
What kind of error would be produced if your robot object tried to pick up a beeper at an intersection that had no beepers?
What kind of error do you have when your run produces neither compile-time errors, nor run-time errors but your program still does not do what is expected......
What is the name of the female programmer who discovered the first computer bug?
What kind of bug was it?
pgs. 9-10 in study guide
On line 4 the keyword EXTENDS means an athlete ________ robot.
We can say that Athlete's SUPERCLASS is the _________ class.
Because this Java file has no main method (meaning it will not run) it is not called an APPLICATION, it is called _______.
Create an Athlete object named thorpe using the default Athlete constructor......
Athlete thorpe = new Athlete ();
The Athlete's default constructor location, direction, and how many beepers......
(1,1), north, infinite beepers
Create a FOR LOOP to have billy turn left 2015 times......
for(int x=1; x<=2015; x++)
Classes, methods, and fields can be tagged with either the keyword public or private.
Public access allows the use of the resource by:
Private access allows the use of the resource from:
Your Java application will look for a resource in 3 places.
The first place your application will look for a resource is _________.
The second place your application will look for a resource is _______.
The third place your application looks is __________.
Create an Athlete object named goalie1 using the default Athlete constructor.......
Athlete goalie1 = new Athlete();
Have goalie1 take the field.....
To "clean" up the code, you have to write it under:
public STATIC void CLIMB(Athlete arg)
After making the main method for CLIMB to clean up the code, how is it written as a command?
Read informational packet