
OOPExam2Review

Quiz
•
Computers
•
University
•
Hard
Jandelyn Plane
Used 3+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Java Quiz

Quiz
•
University
20 questions
Templates,Exceptions,Inheritance in C++ Quiz

Quiz
•
University
20 questions
Programming in Python

Quiz
•
University
20 questions
Basics of programming - Quiz - 01

Quiz
•
University - Professi...
20 questions
AI BootCamp: 2024 Edition- Session 1

Quiz
•
University
25 questions
Quiz on Aggregate Functions in SQL

Quiz
•
University
20 questions
EXCEL

Quiz
•
KG - Professional Dev...
20 questions
MDI Applications and Debugging Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University