Recall & Review
beginner
What is Encapsulation in OOP?
Encapsulation means keeping data (attributes) and code (methods) together in one unit called a class. It hides the internal details and only exposes what is necessary.
Click to reveal answer
beginner
Define Inheritance in simple terms.
Inheritance lets a new class use properties and methods from an existing class. It helps reuse code and create a hierarchy.Click to reveal answer
intermediate
What does Polymorphism mean in OOP?
Polymorphism means many forms. It allows different classes to use the same method name but behave differently depending on the class.
Click to reveal answer
intermediate
Explain Abstraction with an example.
Abstraction hides complex details and shows only the important parts. For example, when you drive a car, you don’t need to know how the engine works, just how to use the steering and pedals.
Click to reveal answer
beginner
Why are OOP principles useful in programming?
They help organize code better, make it reusable, easier to maintain, and model real-world things clearly.
Click to reveal answer
Which OOP principle means hiding internal details and showing only necessary parts?
✗ Incorrect
Abstraction hides complex details and shows only what is needed.
What does inheritance allow a class to do?
✗ Incorrect
Inheritance lets a class reuse code from a parent class.
Polymorphism allows methods to:
✗ Incorrect
Polymorphism means many forms of the same method name.
Encapsulation is best described as:
✗ Incorrect
Encapsulation bundles data and methods in one unit.
Which principle helps make code easier to maintain and reuse?
✗ Incorrect
All OOP principles help improve code organization and reuse.
Describe the four main OOP principles and give a simple example for each.
Think about how a car works for abstraction.
You got /4 concepts.
Why is using OOP principles helpful when writing programs?
Imagine building with Lego blocks.
You got /4 concepts.