Inheritance and Interfaces Quiz

Inheritance and Interfaces Quiz

12th Grade

11 Qs

quiz-placeholder

Similar activities

Week 3-Database Quiz 1

Week 3-Database Quiz 1

9th - 12th Grade

14 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

12th Grade

10 Qs

Fundamentals of Python Programming

Fundamentals of Python Programming

12th Grade

15 Qs

Introduction to Databases Quiz

Introduction to Databases Quiz

10th Grade - University

14 Qs

Skill #2 Array

Skill #2 Array

12th Grade

12 Qs

Digital Interactions and Data Quiz

Digital Interactions and Data Quiz

12th Grade

12 Qs

eXtensible Markup Language

eXtensible Markup Language

12th Grade - University

12 Qs

Coding and AI Knowledge Check

Coding and AI Knowledge Check

10th Grade - University

10 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?