Object-Oriented Programming · Full Mock 1
30 questions across all ten OOPs topics – Java, C++ and Python output, UML diagrams, SOLID and design patterns – with negative marking.
Technical tests
Predict what Java, C++ and Python classes print, read UML class diagrams and choose designs – every program is compiled and run.
OOPs questions appear in nearly every placement test and technical interview, usually as "what does this program print?" puzzles about constructors, overriding and static binding, plus design questions about interfaces, SOLID and patterns. Here each program is shown in a code window and was compiled and run in Java, C++ or Python to produce its answer, and class designs are drawn as UML class diagrams.
Full mocks
30 questions across all ten OOPs topics – Java, C++ and Python output, UML diagrams, SOLID and design patterns – with negative marking.
30 fresh questions – no overlap with Mock 1 – from all ten topics, from constructors and properties to exceptions, LSP and factories.
Topic-wise practice
Classes and objects, references, constructors and overloading, this() chaining, initialisation order, copy constructors, instance vs class attributes and object equality.
Data hiding, getters and setters with validation, public/protected/package/private, Python name mangling and properties, leaky getters, defensive copies and invariants.
is-a relationships, constructor and destructor order, super calls, types of inheritance, field and static hiding, multiple inheritance, the diamond problem, MRO, slicing and the fragile base class.
Compile-time vs run-time polymorphism, overloading rules, overriding and dynamic dispatch, virtual functions, operator overloading, duck typing, and the traps: static types in overload resolution, default arguments, equals(Object).
Abstraction, abstract classes and pure virtual functions, Python ABCs and Protocols, Java interfaces with default, static and private methods, functional interfaces and the rules for default-method conflicts.
Creation and destruction order, RAII and smart pointers, garbage collection and reference counting, try-with-resources and with, shallow vs deep copy, copy and move semantics, the rules of three and five.
Class-level vs instance-level members, static initialisation, final/const variables, methods and classes, this for disambiguation and chaining, super for parent members, classmethod and staticmethod in Python.
try/catch/finally flow, checked vs unchecked exceptions, exception hierarchies and custom exceptions, finally and return, suppressed and chained exceptions, stack unwinding, noexcept and exception safety.
The five SOLID principles, association, aggregation, composition and dependency in UML, multiplicities, coupling and cohesion, composition over inheritance and common design smells.
Creational (Singleton, Factory, Builder, Prototype), structural (Adapter, Decorator, Facade, Proxy, Composite) and behavioural (Strategy, Observer, Command, State, Template Method, Iterator, Chain of Responsibility) patterns – recognising them and predicting what they do.
No sets match this filter.