JPRG Topic 2-2 Inheritance and Polymorphism

JPRG Topic 2-2 Inheritance and Polymorphism

University

6 Qs

quiz-placeholder

Similar activities

INTRODUCTION TO OOPS

INTRODUCTION TO OOPS

University

10 Qs

Inheritance + java

Inheritance + java

University

9 Qs

SC102- Lesson 1 (Recap)

SC102- Lesson 1 (Recap)

5th Grade - University

10 Qs

Thread Priorities

Thread Priorities

University

10 Qs

Competencia de las Casas Semifinales

Competencia de las Casas Semifinales

1st Grade - University

11 Qs

Advanced Java Lab_4CSN

Advanced Java Lab_4CSN

University

10 Qs

Java Classes

Java Classes

12th Grade - University

10 Qs

Inheritance and polymorphism

Inheritance and polymorphism

University

6 Qs

JPRG Topic 2-2 Inheritance and Polymorphism

JPRG Topic 2-2 Inheritance and Polymorphism

Assessment

Quiz

Computers

University

Medium

Created by

Alvin Tang

Used 10+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In a class declaration "public class Student extends Person", the Student class is the ___

parent class

extended class

subclass

my class

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following will implement the relationship as shown?

public class Car import Vehicle

public class Vehicle import Car

public class Vehicle extends Car

public class Car extends Vehicle

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

If the Triangle class is a sub-class of the Shape class, is the given code valid?

True

False

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

In the code snippet shown, the greetings() method is _

overlorded

overloaded

overridden

overwritten

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which access modifier will allow the name and age properties to be accessible from subclasses of Person?

private

protected

inherited

protect

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The super keyword allows subclasses to call methods and properties from the parent class.

No

Yes

Maybe?

I guess. Who am I to judge?