JPRG Topic 2-2 Inheritance and Polymorphism

JPRG Topic 2-2 Inheritance and Polymorphism

University

6 Qs

quiz-placeholder

Similar activities

java quiz on Encapsulation and Abstraction

java quiz on Encapsulation and Abstraction

University

10 Qs

Applet Java

Applet Java

University

10 Qs

AP CSA Unit 9 Inheritance - Polymorphism

AP CSA Unit 9 Inheritance - Polymorphism

University

10 Qs

Ereditarietà e interfacce

Ereditarietà e interfacce

University

7 Qs

P1_APLab2Quiz_B3B4

P1_APLab2Quiz_B3B4

University

10 Qs

Talent Next Java MCQ-1

Talent Next Java MCQ-1

University

10 Qs

Java Control Flow statements

Java Control Flow statements

University

10 Qs

Activity 7: Quiz

Activity 7: Quiz

University

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