Understanding Methods and Inheritance

Understanding Methods and Inheritance

11th Grade

7 Qs

quiz-placeholder

Similar activities

Object Oriented Programming And Flowchart Symbols

Object Oriented Programming And Flowchart Symbols

9th - 12th Grade

12 Qs

Lesson 8: Multimedia

Lesson 8: Multimedia

11th Grade

10 Qs

AP CSA Unit 9 Inheritance - Extends, Super, Overriding

AP CSA Unit 9 Inheritance - Extends, Super, Overriding

10th - 12th Grade

8 Qs

Unit 9 Inheritance

Unit 9 Inheritance

10th - 12th Grade

8 Qs

Unit 9 AP CSA Inheritance

Unit 9 AP CSA Inheritance

10th - 12th Grade

8 Qs

Objects & Classes

Objects & Classes

11th - 12th Grade

10 Qs

Remembering "OOP" ... How To

Remembering "OOP" ... How To

10th - 12th Grade

5 Qs

BenchmarkI RetestPractice - CMPI

BenchmarkI RetestPractice - CMPI

9th - 12th Grade

10 Qs

Understanding Methods and Inheritance

Understanding Methods and Inheritance

Assessment

Quiz

Computers

11th Grade

Hard

Created by

James Santiago

Used 1+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true?

Performing a task in a program requires a method.

A method contains the statements that actually performs its task.

The algorithm that the method represents can consist of a combination of sequencing, selection, and iteration.

All of the above.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is false?

An object's attributes are specified in a class.

A Student object would likely have a gpa attribute that represents the current GPA.

Each Student object knows its GPA but not the GPA of other Student objects.

Attributes are specified by the class's methods.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fill in the blank. Inheritance represents a/an ___ relationship.

has-a

has-many

is-a

is-many

None of the above.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following evaluates to false? I. true II. !true III. false IV. !false

II only

III only

I and IV

II and III

III and IV

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image


Consider the code segment below.

Which of the following initial conditions must be true for the code to run without error?

The Painter object was facing east.

The Painter object had paint.

The Painter object could move forward.

The Painter object does not have any paint.

The Painter object started on paint.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following method header:

public boolean mystery()

How many arguments are needed when calling the mystery() method?

o

1

2

3

infinite

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following code segment.

while(!myPainter.isFacingWest()) {

myPainter.turnLeft();

}

What is the most number of times that the turnLeft() method would be called?

0

2

3

4

infinite