
OOPExam2Review
Authored by Jandelyn Plane
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the 4 pillars of OOP?
Inheritance, Encapsulation, Abstraction and Polymorphism
Abstraction, Methodology,
Privacy and
Inheritance
Encapsulation,
Abstraction,
Inheritance and Privacy
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When there is a private data attribute in the base class, a method of the child class can reach that value by
using super() and the attribute's name
using super() and a public function of the parent
using self and a private function that is defined in the child class
None of these are true
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When there is a function name fun1 in the child, but there is no function named fun1 in the parent
a method in the child class can call that function by using self.fun1()
a method in the parent class can call that function by using self.fun1()
a method in the child class can call that function by using super().fun1()
None of these are true
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the base (named Base) contains a public method named do_this and the child does not have a method named do_this, a method in the child class can call do_this by
using self.do_this()
using super().do_this()
using
Base().do_this(self)
More than one but not all of these are true
All of these three are true
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Recursion is defined as
When one function calls itself directly or indirectly
When the problem is broken down into smaller and smaller pieces until it gets to a base
When the function contains no for-loop or while-loop
Either more than one or none of these are true
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When do you need to use Base.fun(self) rather than super().fun()
If the Base is not the immediate parent of this child class but is an ancestor
If Base is the name of the child class and fun is only defined in the parent class
If there is another parent besides the one named Base for the current child class
More than one of these are true
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you add the -> to the function definition
The Python compiler will give you a warning if the return type does not match
The Python compiler will cast the return value so that the type matches what is indicated
The Python compiler will cause the program to crash when the return type does not match what is indicated
None of the above are true
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Name The Disney Animation Films
Quiz
•
KG - University
20 questions
Control Structures C#
Quiz
•
University
20 questions
Problem Solving Quiz
Quiz
•
6th Grade - University
20 questions
Removal - Part 2
Quiz
•
University
20 questions
DataFeud Round 1
Quiz
•
University
20 questions
Laboratory - Week 10 – 11 Facade Pattern
Quiz
•
University
20 questions
TEST1
Quiz
•
University
21 questions
Sorting algorithms I
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University