Inheritance and Interfaces Quiz

Inheritance and Interfaces Quiz

12th Grade

11 Qs

quiz-placeholder

Similar activities

REVIEW TIME

REVIEW TIME

9th Grade - University

10 Qs

Media Evolution Through the Ages

Media Evolution Through the Ages

12th Grade - University

15 Qs

Java Array Methods Quiz

Java Array Methods Quiz

12th Grade

15 Qs

Cloud Computing Quiz

Cloud Computing Quiz

12th Grade - University

15 Qs

Unit: IV MongoDB and Node.js Quiz

Unit: IV MongoDB and Node.js Quiz

12th Grade - University

14 Qs

Exploring AI in Our World

Exploring AI in Our World

5th Grade - University

10 Qs

Basics of Network and Internet Safety

Basics of Network and Internet Safety

10th Grade - University

10 Qs

Quiz on Methods of System Implementation

Quiz on Methods of System Implementation

12th Grade

15 Qs

Inheritance and Interfaces Quiz

Inheritance and Interfaces Quiz

Assessment

Quiz

Information Technology (IT)

12th Grade

Hard

Created by

Elizzette Mationg

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to establish inheritance between classes?

implements

extends

super

inherits

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the context of inheritance, what does a subclass acquire from a superclass?

Only constructors

Both behaviors and attributes

Only attributes

Only methods

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the relationship called when Class B inherits from Class A?

Has-A relationship

Is-A relationship

Can-Do relationship

Uses-A relationship

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a superclass?

Car

Fish

Tilapia

Earth

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'super' keyword do in a subclass?

Defines a new method

Calls a method from the superclass

Inherits attributes

Creates a new object

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is method overriding?

Deleting a method from the subclass

Using the same method name in both superclass and subclass

Changing the name of a method

Creating a new method in the superclass

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about interfaces?

They define a contract for classes to implement

They can contain method implementations

They can be instantiated directly

They can only have one method

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?