Term
To encapsulate a data field inside your OOP class, you'll always use the modifier: Answer 1. private 2. static 3. public 4. final |
|
Definition
|
|
Term
The three properties of every object are its identity, ___________, and behavior. Answer 1. methods 2. constructors 3. value 4. state |
|
Definition
|
|
Term
The ____________ of an object is represented by its methods. Answer 1. behavior 2. identity 3. state 4. value |
|
Definition
|
|
Term
In object-oriented programming, a(n) ________________ represents the definition—the blueprint if you like—that is used to construct the components of the program. Answer 1. Object 2. Class 3. variable 4. method |
|
Definition
|
|
Term
What is the result of evaluating the integer expression shown here? 89 % (5 + 5) % 5 |
|
Definition
|
|
Term
What is the result of evaluating the integer expression shown here? 17 % 10 / 4 |
|
Definition
|
|
Term
What is the result of evaluating the integer expression shown here? 6 / 2 + 7 / 3 |
|
Definition
|
|
Term
When creating a Scanner object, the parameter passed to the constructor is the _________________________. Answer object that will supply the "raw bytes" for the Scanner to process. name of the Scanner variable. the output stream where the Scanner should place its results. the name of the variable where the Scanner object should place its input when it is used. |
|
Definition
object that will supply the "raw bytes" for the Scanner to process. |
|
|
Term
To read your full name (first and last) into a String variable, using a Scanner object, you should use the method named _________________. Answer nextLine() next() readString() readLine() |
|
Definition
|
|
Term
To use a Scanner object to read input into a whole number variable, call its ______________ method. Answer nextDouble() next() nextInt() readInt() |
|
Definition
|
|
Term
To read a single word of user input, using a Scanner object, and return it to you program as a String value, you will use the ______________ method. Answer nextWord() nextString() nextLine() next() |
|
Definition
|
|
Term
Evaluate the following expression. Math.sqrt(64) (Place only your answer in the text-box below. If the answer is a double, use a decimal like 2.0. If the answer is an integer, just write a plain number like 2.) |
|
Definition
|
|
Term
Evaluate the following expression. Math.min(-2, -5) (Place only your answer in the text-box below. If the answer is a double, use a decimal like 2.0. If the answer is an integer, just write a plain number like 2.) |
|
Definition
|
|
Term
To change the default foreground or background color of your applet, you'll normally use the _____________ method. Answer 1. init(); 2. setColor(); 3. paint(); 4. start(); |
|
Definition
|
|
Term
In the code shown here: new Color(0, 0, 0, 255) the number 255 controls the object's _________________. Answer 1. red color 2. green color 3. blue color 4. transparency |
|
Definition
|
|