Skip to content

Oop Principles Practice Exam

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.

📝 50 questions · ⏱ 60 minutes · 🎯 Pass mark 70% · 🆓 Free, no signup

Exam details

  • 50 questions drawn from 50 cards
  • Countdown timer — auto-submits when time runs out
  • Pass mark 70% (real certification threshold)
  • Full review of wrong answers at the end
  • No signup required — save your score with a free account

Sample Questions

5 shown

What is encapsulation in OOP?

Show ▼

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:

  • Hides internal state and implementation details
  • Exposes only a controlled public interface
  • Protects object integrity by preventing unintended modification

What is inheritance in OOP?

Show ▼

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:

  • Promotes code reuse
  • Establishes an is-a relationship
  • Enables polymorphic behavior

What is polymorphism in OOP?

Show ▼

Polymorphism means "many forms" — the ability of an object to take on different behaviors depending on its type.

Two main types:

  • Compile-time (static): method overloading
  • Run-time (dynamic): method overriding via inheritance
Example: a Shape.draw() method behaves differently for Circle vs Rectangle.

What is abstraction in OOP?

Show ▼

Abstraction is the process of hiding complex implementation details and exposing only the essential features of an object.

Achieved through:

  • Abstract classes — partial implementation
  • Interfaces — pure contract, no implementation
Example: a Vehicle interface exposes start() and stop() without revealing engine internals.

What is the Single Responsibility Principle (SRP)?

Show ▼

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.

🎯 Take the Oop Principles Practice Exam