Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
Encapsulation is the bundling of data and methods that operate on that data into a single unit (class), while restricting direct access to some components.
Key benefits:
Inheritance allows a child class (subclass) to acquire the properties and behaviors of a parent class (superclass).
Example in Java:class Dog extends Animal { }
Benefits:
Polymorphism means "many forms" — the ability of an object to take on different behaviors depending on its type.
Two main types:
Shape.draw() method behaves differently for Circle vs Rectangle.
Abstraction is the process of hiding complex implementation details and exposing only the essential features of an object.
Achieved through:
Vehicle interface exposes start() and stop() without revealing engine internals.
The S in SOLID. A class should have only one reason to change, meaning it should have only one job or responsibility.
Violation example: a UserService class that handles authentication, email sending, and database queries.
Fix: split into AuthService, EmailService, and UserRepository.