1. What are the three types of design patterns?
__________________
2. As a recommended practice in OOP, which is preferred?
a. Object composition
b. Class inheritance
c. Programming to an implementation
d. none of the above
3. Polymorphism happens at which time?
a. Compile time
b. Run time
c. Both of the above
d. None of the above
The sources for C are these:
https://www.geeksforgeeks.org/difference-between-compile-time-and-run-time-polymorphism-in-java/
https://www.nerd.vision/post/polymorphism-encapsulation-data-abstraction-and-inheritance-in-object-oriented-programming
4. Inheritance happens at which time?
a. Compile time
b. Run time
c. Both of the above
d. None of the above
5. Composition in OOP happens at which time?
a. Compile time
b. Run time
c. Both of the above
d. None of the above
6. With encapsulation, what is exposed?
a. Methods
b. Data
c. Both of the above
d. None of the above.
7. When can objects (as in OOP) exist?
a. Objects can exist at compile time
b. Objects can exist at run time
c. Both of the above
d. None of the above
8. What is another term for parent class?
a. Ancestor class
b. Base class
c. Superclass
d. All of the above
e. None of the above
9. Which of the following programming languages allow for multiple inheritance of classes? Choose all that apply.
a. Python
b. Java
c. C++
d. C#
e. None of the above
To see the answers, click here.