Explain the conceptual difference between a class and an object. If a class is a blueprint, what exactly is the instance in memory?
Junior
What is the 'this' (or 'self') reference conceptually, and how does an object know its own context?
Junior
What is the difference between a Class and an Object in terms of memory allocation?
Junior
How does the lifecycle of an object work, and explain the concept of garbage collection or manual destruction at a high level?
Mid
Can you have an object without a class?
Mid
What happens conceptually during Object Instantiation?
Mid
What is the 'Root Object' concept (e.g., Object class) found in many OO languages?
Mid
Explain the difference between state, behavior, and identity of an object.
Mid
Explain the order of initialization when an object is instantiated.
Mid
Paradigm & OOP Principles
How does Object-Oriented Programming differ from procedural or structured programming, and what specific problems does it solve?
Junior
Explain the four pillars of OOP to a non-technical stakeholder.
Junior
What are the primary goals of OOP, and how does it improve modularity, reusability, and maintainability in a large-scale codebase?
Mid
Explain the concept of 'Message Passing' in OOP.
Mid
What are the common criticisms of the object-oriented paradigm?
Senior
What are the trade-offs of using OOP, and in what scenarios might a different paradigm like functional or procedural be more effective?
Senior
What is the 'Message Passing' view of OOP versus the 'Method Call' view?
Senior
Abstraction & Encapsulation
Why do we use getters and setters instead of making fields public, and what is the architectural benefit of this boilerplate?
Junior
How does Encapsulation improve the security and maintainability of a system?
Junior
Explain the concept of Abstraction using a real-world example other than an ATM or a Car.
Junior
What is the difference between data hiding and encapsulation: are they the same thing?
Junior
What is the difference between Abstraction and Encapsulation? They both hide things, so why do we need both?
Mid
Explain the conceptual difference between public, private, and protected access, and why is package-private or internal visibility useful in large systems?
Mid
Class Structures & Members
What is the difference between a static member and an instance member, and when is it appropriate to use a static method instead of an instance method?
Junior
What is an 'Inner Class' (or Nested Class), and when is it conceptually appropriate to use one?
Mid
What is an anonymous class, and in what situations is it conceptually appropriate to use one?
Mid
What is the purpose of a sealed or final class, and when would you prevent a class from being extended?
Mid
Can a class be both Abstract and Final? Why or why not?
Senior
What is name mangling, and what problem does it solve in the context of overloading or private members?
Senior
Constructors & Instantiation
Explain the purpose of a Constructor. Can a Constructor be inherited or overridden?
Junior
What is the difference between a default constructor and a parameterised constructor?
Junior
What is constructor overloading, and why would a class provide multiple constructors?
Junior
What is the purpose of a constructor, and can you explain constructor chaining and why it is used in inheritance hierarchies?
Mid
Under what circumstances would you define a constructor as private, and what does this achieve conceptually?
Mid
What is a copy constructor, and when would you use one instead of relying on default copying?
Mid
What is the concept of a static factory method as a language feature, and how does it differ from using a constructor directly?
Mid
Inheritance & Relationships
Explain the difference between 'Is-A' and 'Has-A' relationships.
Junior
Can you explain the different types of inheritance, single, multilevel, hierarchical, and hybrid?
Junior
Explain the difference between association, aggregation, and composition, and how does ownership and lifetime define a composition versus an aggregation?
Mid
Explain the is-a relationship, and what are the risks of creating an inheritance hierarchy that is too deep?
Mid
What is the difference between Aggregation and Composition in terms of object lifetime?
Mid
Why can a class implement multiple interfaces but not inherit from multiple classes in many languages?
Mid
What is a dependency relationship between classes, and how does it differ from an association?
Mid
How do UML class diagrams represent relationships like inheritance, composition, and association, including multiplicity?
Mid
What is the conceptual difference between class-based and prototype-based object orientation?
Senior
Polymorphism & Binding
What is the difference between Method Overloading and Method Overriding?
Junior
What is 'Method Overriding,' and what happens if a child class calls a method that exists in both the parent and the child?
Junior
At a high level, what is polymorphism and why is it considered central to object-oriented design?
Junior
Explain the difference between compile-time (static) and runtime (dynamic) polymorphism with a conceptual example of each.
Mid
What is method overriding, and how does it differ from method hiding or shadowing?
Mid
What is the difference between Upcasting and Downcasting, and what are the risks of the latter?
Mid
What is a 'Virtual Method' conceptually, and how does 'Late Binding' work?
Mid
What are the rules for method overloading versus overriding, and can you overload a method by changing only the return type?
Mid
Explain the concept of 'Subtype Polymorphism' without using code.
Mid
What is the difference between 'Early Binding' and 'Late Binding'?
Mid
Explain the concept of 'Dynamic Dispatch' or 'Late Binding'.
Senior
Explain 'Covariance' and 'Contravariance' in the context of method overriding and return types.
Senior
What is the difference between subtype, parametric, and ad-hoc polymorphism?
Senior
How does Run-Time Type Information (RTTI) allow a program to determine an object's actual type at runtime?
Senior
What is method resolution order as a concept, and why does it matter when a method exists at multiple levels of a hierarchy?
Senior
Interfaces & Abstract Types
What is a pure virtual (abstract) method, and how does it force subclasses to provide behaviour?
Junior
What is the difference between an Abstract Class and an Interface, and when would you choose one over the other?
Mid
What is a 'Marker Interface,' and what is its purpose if it has no methods?
Mid
What does it mean to say an interface is a contract, and how does this facilitate decoupled development between teams?
Mid
Can an Interface have a constructor? Why or why not?
Mid
How do 'Default Methods' in interfaces change the traditional definition of an interface?
Senior
What is the difference between a default (interface) method and a regular abstract method, and how do default methods affect interface evolution?
Senior
Class Design & Coupling
Why is it often said that you should favour composition over inheritance, and what are the specific trade-offs in flexibility?
Mid
Explain the concept of substitutability: why should a derived class be able to stand in for its base class without breaking the program?
Mid
What does it mean for two objects to be 'Tightly Coupled,' and how does OOP help achieve 'Loose Coupling'?
Mid
How do you identify potential classes and responsibilities from a set of requirements?
Mid
What does 'High Cohesion' mean for a class, and why is it desirable?
Mid
In the context of object design, what does it mean to have high cohesion and low coupling, and why is this the gold standard?
Mid
How do you decide what should be a class versus what should be an attribute when modeling a real-world system?
Mid
What is the fragile base class problem, and how does it affect the long-term maintenance of a system?
Senior
What are the tradeoffs of using deep Inheritance hierarchies?
Senior
Explain the gorilla-banana problem in inheritance.
Senior
Object Semantics & Identity
What is the purpose of an object's string representation (toString), and why is overriding it useful?
Junior
What is the difference between a Shallow Copy and a Deep Copy when cloning an object?
Mid
Explain the concept of 'Object Equality' versus 'Object Identity.' How do they differ?
Mid
What is an immutable object, and what are the benefits of designing classes to be immutable by default?
Mid
What is the contract between equals and hashCode, and why must two 'equal' objects produce the same hash code?
Mid
Advanced OOP Mechanisms
What is the purpose of generics in OOP, and how do they improve type safety without sacrificing reusability?
Mid
What is operator overloading conceptually, and what are the risks of abusing it?
Mid
What is a finalizer or destructor conceptually, and why are finalizers considered unreliable for resource cleanup?
Mid
What is 'Reflection' (or Introspection) in OOP, and what are its use cases and risks?
Senior
What is the 'Diamond Problem' in multiple inheritance, and how do different languages conceptually resolve it?
Senior
What are mixins or traits conceptually, and how do they provide a middle ground for languages that don't support multiple inheritance?
Senior
What is the purpose of a Virtual Destructor?
Senior
What is virtual inheritance conceptually, and what problem in inheritance hierarchies is it meant to address?