CS6203C Object Oriented Programming - Prelim - Q2
CS6203C Object Oriented Programming - Prelim - Q2
00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
These are variables which have declarations inside methods, constructors or blocks.
Select one:
a.
Class variables
b.
Variable Types
c.
Instance variables
d.
Local variables
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The class whose properties and functionalities are use (inherited) by another class is known
as _______________?
Select one:
a.
Parent Class
b.
Child Class
c.
Sub Class
d.
B and C
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The following are the advantages of Inheritance except.
Select one:
a.
Reusability of code
b.
Allows you to define one interface
c.
One superclass can be used for the number of subclasses in a hierarchy
d.
Avoids duplicity and data redundancy
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The capability of a method to do different things based on the object that it is acting upon.
In other words, it allows you define one interface and have multiple implementations.
Select one:
a.
Encapsulation
b.
Polymorphism
c.
Inheritance
d.
Abstraction
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
It is the most fundamental entity in Java or any other Object Oriented Language.
Select one:
a.
Object
b.
Behavior
c.
Method
d.
Class
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Use to define the visibility of classes, methods, and attributes.
Select one:
a.
Protected
b.
Private
c.
Public
d.
Access Modifier
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
These variables are inside a class however outside any method. They come into existence
when the class instantiates.
Select one:
a.
Variable Types
b.
Local variables
c.
Instance variables
d.
Class variables
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The process by which one class acquires the properties (data members) and
functionalities(methods) of another class.
Select one:
a.
Abstraction
b.
Encapsulation
c.
Polymorphism
d.
Inheritance
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The same method in child class which is already present in the parent class.
Select one:
a.
Object Overloading
b.
Object Overriding
c.
Method Overriding
d.
Method Overloading
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The superclass constructor can be called explicitly using the ____________________ ?
Select one:
a.
Super Keyword
b.
Super Class
c.
Constructor
d.
Inheritance
Question 11
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The class that extends the features of another class is known as _____________?
Select one:
a.
Sub Class
b.
Parent Class
c.
B and C
d.
Child Class
Question 12
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The super keyword refers to the ______________, immediately above of the calling class in the
hierarchy.
Select one:
a.
Inheritance
b.
Super Class
c.
Constructor
d.
Super Keyword
Question 13
Correct
Mark 1.00 out of 1.00
Flag question
Question text
It is a blueprint for objects to follow a specific schema defined in the class.
Select one:
a.
Method
b.
Object
c.
Class
d.
Behavior
Question 14
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Sub class is invoked when we create the object of subclass, it by default invokes the default
constructor of super class.
Select one:
a.
Super Keyword
b.
Constructor
c.
Super Class
d.
Inheritance
Question 15
Correct
Mark 1.00 out of 1.00
Flag question
Question text
It has the static keyword as a prefix in its declaration. Its definition occurs only inside a class
and outside any function.
Select one:
a.
Instance variables
b.
Class variables
c.
Variable Types
d.
Local variables
Question 16
Correct
Mark 1.00 out of 1.00
Flag question
Question text
This is the most restrictive and most commonly used access modifier. If you use the this
modifier with an attribute or method, it can only be accessed within the same class.
Select one:
a.
Private
b.
Protected
c.
Public
d.
No Modifier
Question 17
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Attributes and methods with the access modifier protected can be accessed within your
class, by all classes within the same package, and by all subclasses within the same or other
packages.
Select one:
a.
No Modifier
b.
Protected
c.
Public
d.
Private
Question 18
Correct
Mark 1.00 out of 1.00
Flag question
Question text
This is the least restrictive access modifier. Methods and attributes that use the public
modifier can be accessed within your current class and by all other classes.
Select one:
a.
Public
b.
No Modifier
c.
Private
d.
Protected
Question 19
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
Select one:
a.
Public
b.
Protected
c.
Private
d.
No Modifier
Question 20
Correct
Mark 1.00 out of 1.00
Flag question
Question text
One of the OOPs feature that allows us to perform a single action in different ways.
Select one:
a.
Abstraction
b.
Inheritance
c.
Polymorphism
d.
Encapsulation