Mutable/ Immutable
Objects
Designing Classes
Arrays of Objects and Arrays of Arrays
¿Random?
Analyzing Code
100

What import do you have to use for Wrapper Classes?

None, they are by default in the Java Library, meaning they are used without any special imports.

100

What is another name for Attributes?

Instance Variables.
100

What is a sequential search?

An algorithm that searches array elements, one by one, until a target value is found.

100

What is a process for determining what methods a class or program should have?

Design Process

100

RegularPolygon rp = new RegularPolygon(3, 50, Color.BLUE);

rp.translate(100, 100);

what does this code do?

It creates a three sided polygon(triangle), with a radius of 50, and sets the color to blue. It also turns populates it at the point 100,100.

200

What arithmetic class from java.math would be used  to make an arbitrarily large numbers?

A) LargeNumber

B) BigNumber

C )BigInteger

c) BigInteger

200

How many arguments should a constructor class take?

None. They initialize instance variables to 0.

200

What is the row-major order?

Storing data in a 2D array, first by rows and then by columns.

200

What does UML stand for?

Unified Modeling Language.

200

for (int a = 0; a<array.length; a++){
     for (int b = 0; b<array[a].length; b++){
        string += array[a][b];
     }

 System.out.println(string)

}

It is traversing through a 2D array and printing out the results of what it does.

300

What is it called when you have an array with no elements and a length of zero?

An Empty Array

300

What is the difference between a value constructor and a constructor?

A value constructor takes in arguments that are equal to the number of instances variables, while constructors have no arguments.

300

What is it called when you have more than one array together (array[a][b])?

A Multi-Dimensional Array.

300

What occurs when a local variable or parameter has the same name as an attribute?

Shadowing

300

What is returned?

 int a = 3;

        int b = 4;

        int c = a * (a + b);

        String alpha = "Same";

        String bravo = "Sa" + "me";

        if (c <= 40) {

            if (alpha.equals(bravo)) {

                return true;

            } else {

                return false;

            }

        } else {

            return false;

        }

    }

True

400
What is it called when you replace something unnecessarily specific with something appropriately general?

To generalize

400

What is a Client?

A class that uses objects defined in another class.

400

What is it called when you represent one set of values using another set of values by constructing a mapping between them.

Encoding.

400

What are you doing when you represent one set of values using another set of values by constructing a mapping between them?

Encode

400
Fill in the blank:


Integer x = Integer.valueOf(123); 

Integer y = Integer.valueOf(123); 

if (x == y) {                   

   return ___;

if (x.equals(y)){                 

   return ___;

 }

x == y - false

x.equals(y) - true

500

You can use the key word 'null' in any variable in the java library.

True

or

False

False. You can only use it in object variables(Strings and/or arrays).

500

What is it called when you create a new instance of a class in the computer's memory?

To Instantiate.
500
What type of for loop do you use to traverse 2D arrays?

Nested for loops.

500

What is a computer graphic that may be moved or otherwise manipulated on the screen?

Sprite

500

Why is my code not running?

        String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

        int bravo = 1;

        int charlie = 2;

        string delta = "Hello World!";

        System.out.printnl(alpha + bravo + charlie + delta);

'println' is miss spelled.

String delta needs to be capitalized.

M
e
n
u