Search Header Logo

Inheritance Pt. 1

Authored by Herman Galioulline

Computers

10th - 12th Grade

Used 24+ times

Inheritance Pt. 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

A bear is an animal and a zoo contains many animals, including bears. Three classes Animal, Bear, and Zoo are declared to represent animal, bear, and zoo objects. Which of the following is the most appropriate set of declarations?

Media Image
Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

When designing a class hierarchy, which of the following should be true of a superclass?

A superclass should contain the data and functionality that are common to all subclasses that inherit from the superclass.

A superclass should be the largest, most complex class from which all other subclasses are derived.

A superclass should contain the data and functionality that are only required for the most complex class.

A superclass should have public data in order to provide access for the entire class hierarchy.

A superclass should contain the most specific details of the class hierarchy.

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

When designing classes, which of the following would be the best reason to use inheritance?

Inheritance allows you to write applications that require fewer base and super classes.

Inheritance allows the creation of a subclass that can use the methods of its superclass without rewriting the code for those methods.

Inheritance allows for data encapsulation, while noninherited classes do not allow for data encapsulation.

Inheritance reduces the number of polymorphic structures encapsulated in applications.

Inheritance guarantees that the applications will compile and execute much more quickly.

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

When we talk about two classes having a Superclass/Subclass relationship, which type of relationship do we have?

Had a

Are a

Am a

Is a

Has a

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following best describes a Subclass / Superclass relationship?

VideoGame / Fortnite

Student / ZISStudent

VideoGame / AmongUs

Cryptocurrency / Bitcoin

Ethereum / Cryptocurrency

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?