Launch sale 50% off every pass

See plans

Object-oriented programming

OOP rounds in campus placements and university exams ask about language mechanisms by name: virtual functions, vtables, the diamond problem, abstract classes versus interfaces, overloading versus overriding. This course explains how each one works in C++, Java and Python, so you can answer the follow-up question as well as the first one.

7 lessons80 minUpdated 28 Oct 2026

Start the course

Lessons

  1. Objects, classes and encapsulation

    State and behaviour, class invariants, access control in C++, Java and Python, and why a getter and setter for every field is not encapsulation.

    12 minFree
  2. Object lifetime: construction, destruction and copying

    Constructors and initialization order, destructors and RAII, garbage collection, shallow and deep copies, the rule of three/five/zero, and equals and hashCode.

    12 minInterview Prep pass
  3. Inheritance and multiple inheritance

    What a subclass inherits, constructor chaining, protected members, and the diamond problem in C++, Java and Python’s C3 method resolution order.

    12 minInterview Prep pass
  4. Polymorphism: overloading, overriding and vtables

    Overloading versus overriding, static and dynamic dispatch, how vtables and vptrs implement virtual calls, virtual destructors, object slicing and duck typing.

    12 minInterview Prep pass
  5. Abstract classes and interfaces

    Pure virtual functions, Java abstract classes versus interfaces with default methods, Python ABCs and protocols, and how to choose between them.

    10 minInterview Prep pass
  6. Composition over inheritance

    The fragile base class problem, classes that inherit too much, the Liskov substitution principle with a concrete violation, delegation and refactoring a hierarchy into composition.

    10 minInterview Prep pass
  7. OOP interview questions, answered by mechanism

    Static members, this and self, final and sealed, friend, early and late binding, and constructors that throw, each explained by how the language implements it.

    12 minInterview Prep pass

Interview Prep pass · Compare plans

Esc
↑↓Move ↵Open Ctrl↵New tab >Actions ?Shortcuts

Keyboard shortcuts

Anywhere

Open search
CtrlKor /
Show these shortcuts
?
Close a window or menu
Esc

In search

Move through results
↑or ↓
Open the result
↵
Open in a new tab, or a problem on its judge
Ctrl↵
List actions only
>
Remove the filter
⌫

Go to

Learn
GthenL
Practice
GthenP
Assessments
GthenA
System design
GthenS
Companies
GthenC
My profile
GthenM
Today's quest
GthenT
Home
GthenH

Report a bug

Page