Dirksen Trivia
Boolean Logic and Conditions
Loops and Iterations
OOP
Bearcat Trivia
100

What Disney character were we (Mrs. Dirksen) told we look akin to?

Dory, from Finding Nemo

100

What is the value of the following expression?

true || false && false && !true

true

100

What will print?
int i = 3;

while (i > 0) {

    System.out.print(i);

    i--;

}

321

100

What is a constructor?

A method that initializes an object when it is created

100

Name 3 CTE classes

Comp Sci, Biotech, Photography, Yearbook, ETC

200

Where did we (Mrs. Dirksen) get our BS degree in Engineering?

Harvey Mudd

200

Given int x = 4; what is the value of the following expression?


x > 2 && x < 5 || x == 10 && !(x % 2 == 0)

true

200

What will print?
int sum = 0;
for (int i = 1; i <= 4; i++) {
    sum += i;}
System.out.println(sum);

10

200

What is method overriding?

When a subclass provides its own implementation of a method already defined in the superclass

200

What is the name of the day-long event recently hosted by our school to create a more inclusive student environment?

Breaking down the walls

300

How long have we (Mrs. Dirksen) taught at SMHS?

This is our 18th year! Started in 2008

300

Given int x = 6; What is the value of the following expression?


x > 2 && x < 5 || x == 10 && !(x % == 0)

false

300

What will print?
for (int i = 1; i <= 3; i++) {
    for (int j = 1; j <= i; j++) {
        System.out.print("*");}
    System.out.println();}

*
**
***

300

What will print?

class Animal {

    public void speak() {

        System.out.println("Animal");}

}

class Dog extends Animal {

    public void speak() {

        System.out.println("Dog");}

}

Animal a = new Dog();

a.speak();

Dog

300

What is the address of San Mateo High?

506 N Delaware St, San Mateo CA

400

True or False: We (Mrs. Dirksen) were a frat sweetheart

False, however we did live at a frat over the summer

400

Given int x = 5; int y = 2; What is the value of the following expression?


x > 3 && y < 5 || !(x - y == 3)

false

400

What does mystery(3); return?
public static int mystery(int n) {
    if (n == 0) return 1;
    return 2 * mystery(n - 1)}

8

400

What will print?
public class Car {
    private int speed;}

Car c = new Car();
System.out.println(c.speed);

The code will not compile because speed is a private variable that can’t be accessed outside of its class.

400

When was SMHS opened?

1902
500

In which school’s frat did we (Mrs. Dirksen) live in one summer?

MIT

500

Given int x = 2; int y = 3; int z = 4; What will print?

if (!(x + y > z) && x * y >= z || !(z % x == 0) && y < z) {

    System.out.println("YES");}

else {

    System.out.println("NO");}

YES

500

Write a loop that counts how many numbers from 1–100 are divisible by both 3 and 5

Can write a loop counting up by 15s, or a loop that checks if %3 and %5 == 0

500

What will print?
Box a = new Box(3);
Box b = new Box(4);

a = b;
b.value = 9;
System.out.println(a.value);

9 (After a = b, a is pointing the the object that b is modifying)

500

Friday, May 15th, 11:45 pm

The date of your AP CS test 😈