Overriding

Description

This Quiz aims to test the basic objective of inheritance
khameed
Quiz by khameed, updated more than 1 year ago
khameed
Created by khameed almost 10 years ago
49
0

Resource summary

Question 1

Question
One of the main concepts in OOP is _____________ That allows to use the features ( methods )of one class in another?
Answer
  • Libraries
  • Inheritance
  • polymorphism
  • abstraction

Question 2

Question
Identify the child class in the java statement. public class Student extends Person{
Answer
  • public
  • Student
  • Person
  • extends

Question 3

Question
In Method Overriding the following the following conditions hold. Select more than one that apply
Answer
  • Child class method must have same name as in the parent class.
  • Child class method must have same parameter as in the parent class.
  • Child class method must have same return type as in the parent class
  • Child class method must have different name as in the parent class.
  • Child class method must have different return type as in the parent class
  • Child class can have different method signature

Question 4

Question
Inheritance enhances the ability to reuse existing code.
Answer
  • True
  • False

Question 5

Question
An object of a sub class can not be referenced by a variable of a super class type
Answer
  • True
  • False
Show full summary Hide full summary

Similar

Exam 70-410: Installing and Configuring Windows Server 2012 R2
Mike M
Biology 1 Keeping Healthy Core GCSE
Chloe Roberts
Blues, Beats & More! Quiz
Mike'd
USA and Vietnam (1964 - 1975) Part 2
Lewis Appleton-Jones
Sociology - Crime and Deviance - Feminists
josaul1996
GCSE Computing: Hardware
Yasmin F
Historia matematyki II
Tomasz Kacperek
Mga Tauhan ng Ibong Adarna
mark.sy7054
Romeo and Juliet notes
Faizaan Mohmed
Family in the park
Eleuterio Caicedo Valencia