#119 Topic 2.3 Video 2

#119 Topic 2.3 Video 2

11th Grade

5 Qs

quiz-placeholder

Similar activities

JS_TIPEDATA

JS_TIPEDATA

11th Grade

10 Qs

Quiz 15 - Array Basics

Quiz 15 - Array Basics

11th Grade

10 Qs

Tom & Jerry

Tom & Jerry

1st - 11th Grade

10 Qs

OCA Arrays

OCA Arrays

KG - University

10 Qs

Quiz 16 - Arrays and Loops

Quiz 16 - Arrays and Loops

11th Grade

10 Qs

Two-Dimensional Array

Two-Dimensional Array

9th - 12th Grade

6 Qs

Indexes 2

Indexes 2

11th Grade

10 Qs

Java-Array and Loops

Java-Array and Loops

7th - 12th Grade

5 Qs

#119 Topic 2.3 Video 2

#119 Topic 2.3 Video 2

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Myra Deister

Used 1+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the video the first attribute that is created for a lamp is

color

size

isOn

location

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one of the behaviors for the lamp in the video?

setBrightness

turnOn

setLevel

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a NullPointerException?

A NullPointerException is a runtime error that occurs when a program tries to access or use an object reference that has a null value.
A NullPointerException is a compile-time error that occurs when a program tries to access or use an object reference that has a null value.
A NullPointerException is a syntax error that occurs when a program tries to access or use an object reference that has a null value.
A NullPointerException is a logical error that occurs when a program tries to access or use an object reference that has a null value.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is output by the code below?      

 

public class CS

{

   public void one()

   {   

     System.out.print("go")

}

 

   public void two()

   {    

     System.out.print("back");

   }

}

//code in the main of another class

CS test = new CS();

test.one();

test.two();

go

back

goback

gobackback

gobackgobackgo

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correctly written method for the class below?

public class Timer

{

private int startMin;

private int length;


public Timer(int minute, int duration)

{

startMin = minute;

length = duration;

}


public Timer(int duration)

{

startMin = 0;

length = duration;

}

}

public void addFiveMinutes()

{

length = length + 5;

}

public addFiveMinutes()

{

length = length + 5;

}

addFiveMinutes()

{

length = length + 5;

}

public void addFiveMinutes

{

length = length + 5;

}