
G11 Unit 2 Exercises

Quiz
•
Computers
•
11th Grade
•
Medium

Razan Alghamdi undefined
Used 2+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The composition of attributes and methods is defined by
Inheritance
Method
Class
Object
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is true about the inheritance concept in object-oriented programming?
A child class can inherit attributes and methods from multiple parent classes.
Child classes cannot have additional attributes or methods beyond those of the parent
A parent class can inherit from its child class.
Only methods can be inherited from the parent class.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code and identify the parent class.
class A:
pass
class B(A):
pass
class C(A):
pass
A
B
C
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, what is an example of polymorphism?
Creating classes that inherit from multiple parent classes.
Creating multiple classes with the same name.
Using the len() method on different data types.
Writing multiple functions with different names that perform the same action.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following program.
class Parent:
def speak(self):
return "Parent Speaking"
class Child(Parent):
def speak(self):
return "Child Speaking"
obj = Child()
print(obj.speak())
Child Speaking
An error will be raised
None of the above
Parent Speaking
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if a method is not found in the Child class but is present in the parent class?
The program will throw an error.
The method from the parent class will be executed.
The program will terminate.
The method from the child class will be executed.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which feature of OOP allows the reusability of code?
Inheritance
Class
Method
Object
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Android & Android Studio 1

Quiz
•
7th - 12th Grade
15 questions
Databases

Quiz
•
11th Grade
11 questions
Computer Programming: Graphics

Quiz
•
8th - 11th Grade
15 questions
Unity Interface Basics 101

Quiz
•
9th - 12th Grade
12 questions
Web II: CSS Positioning

Quiz
•
9th - 12th Grade
15 questions
INTRODUCTION TO OOP TECHNIQUE

Quiz
•
11th - 12th Grade
20 questions
Variables and Loops Review

Quiz
•
9th - 12th Grade
11 questions
G11 W11 P1

Quiz
•
11th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade