CS 122 - Final Examination

CS 122 - Final Examination

University

16 Qs

quiz-placeholder

Similar activities

Swing

Swing

University

15 Qs

Machine Learning

Machine Learning

University

20 Qs

Java Programming

Java Programming

University

20 Qs

Academic Vocabulary

Academic Vocabulary

7th Grade - University

20 Qs

Java Operators

Java Operators

University

14 Qs

Java GUI

Java GUI

University

15 Qs

Java Object Creation and Classes

Java Object Creation and Classes

University

20 Qs

Stepford County Railway Quiz

Stepford County Railway Quiz

1st Grade - University

21 Qs

CS 122 - Final Examination

CS 122 - Final Examination

Assessment

Quiz

Computers

University

Hard

Created by

Christine Pitos

Used 7+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A way to discover which of the two classes is the base class and which is the subclass is to _______.

look at the class size

try saying the two class names together

use polymorphism

Both a and b are correct

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Employing inheritance reduces errors because ______.

the new classes have access to fewer data fields

the new classes have access to fewer methods

you can copy methods that you already created

many of the methods you need have already been used and tested

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A base class can also be called a ______.

child class

subclass

derived class

superclass

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following choices is the best example of a parent class/child class relationship?

Rose/Flower

Present/Gift

Dog/Poodle

Sparrow/Bird

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The Java keyword that creates inheritance is _____.

static

enlarge

extends

inherits

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A class named Building has a public, nonstatic method named getFloors(). If School is a child class of Building, and modelHigh is an object of type School, which of the following statements is valid?

Building.getFloors();

School.getFloors();

modelHigh.getFloors();

All of the previous statements are valid.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true?

A child class inherits from a parent class.

A parent class inherits from a child class.

Both of the preceding statements are true.

Neither a nor b is true.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?