[go: up one dir, main page]

0% found this document useful (0 votes)
645 views7 pages

Prelim Lab Quiz 2

This document is a summary of a student's performance on a prelim lab quiz in their UGRD-CS6203C Object-Oriented Programming course. The student answered 10 out of 10 questions correctly and received a grade of 90% overall. The quiz covered topics related to object-oriented programming concepts like constructors, inheritance, polymorphism, and constants.

Uploaded by

RianneNael
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
645 views7 pages

Prelim Lab Quiz 2

This document is a summary of a student's performance on a prelim lab quiz in their UGRD-CS6203C Object-Oriented Programming course. The student answered 10 out of 10 questions correctly and received a grade of 90% overall. The quiz covered topics related to object-oriented programming concepts like constructors, inheritance, polymorphism, and constants.

Uploaded by

RianneNael
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

UGRD-CS6203C Object-Oriented

Programming
1. Home
2. My courses
3. UGRD-CS6203C-2123T
4. Week 4: Inheritance and Polymorphism
5. Prelim Lab Quiz 2

Started on Monday, 21 February 2022, 2:53 AM


State Finished
Completed on Monday, 21 February 2022, 3:07 AM
Time taken 14 mins 10 secs
Marks 18.00/20.00
Grade 90.00 out of 100.00
Question 1
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which one is true about a constructor ?

a.
A constructor is used to create objects.

b.
A constructor must have the same name as the class it is declared within.

c.
All of the above

d.
A constructor may be declared private
Feedback
Your answer is correct.

Question 2
Correct
Mark 2.00 out of 2.00

Flag question

Question text
In Object Oriented Programming the mechanism of deriving a new class from an old one is
called -

a.
Method overloading

b.
Inheritance

c.
Operator overloading

d.
Method overriding
Feedback
Your answer is correct.

Question 3
Incorrect
Mark 0.00 out of 2.00

Flag question

Question text
If two methods have same name but different parameter list then it is called what -

a.
Operator overloading

b.
Method overloading

c.
Method overriding

d.
None of these
Feedback
Your answer is incorrect.

Question 4
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which among the following best describes multiple inheritance?

a.
Only one class being parent of other child classes

b.
More than one class being parent of other child classes

c.
Only one class being parent of single child

d.
More than one class being parent of single child
Feedback
Your answer is correct.

Question 5
Correct
Mark 2.00 out of 2.00

Flag question
Question text
What keyword is used in Java to define a constant?

a.
private

b.
abstract

c.
static

d.
final
Feedback
Your answer is correct.

Question 6
Correct
Mark 2.00 out of 2.00

Flag question

Question text
In a class definition, the special method provided to be called to create an instance of that
class is known as a/an -

a.
Constructor

b.
Interpreter

c.
Destructor

d.
Object
Feedback
Your answer is correct.

Question 7
Correct
Mark 2.00 out of 2.00

Flag question

Question text
What method is used to find the nth no. of character of given string s1. ?

a.

s1.index

b.
s1.length()

c.

s1.charAt

d.

s1.substring
Feedback
Your answer is correct.

Question 8
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Consider the following statement(s) about Java:
I. All white-space characters (blanks) are ignored by the compiler.
II. Java keywords can be used as variable names.
III. An identifier does not begin with a digit and does not contain any spaces.
IV. The execution of Java applications begins at method main.
Which of them is correct?

a.
(III) and (IV) above

b.
Both (I) and (II) above

c.
Both (I) and (III) above

d.
Both (II) and (IV) above
Feedback
Your answer is correct.

Question 9
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Re-implementing an inherited method in a sub class to perform a different task from the
parent class is called -

a.
Binding

b.
Coupling

c.
Hiding
d.
extending
Feedback
Your answer is correct.

Question 10
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which one is a template for creating different objects ?

a.
A Class

b.
Method

c.
Interface

d.
An Array
Feedback
Your answer is correct.

You might also like