Key Concepts & Self-Assessment20 Key Facts
Review key Object-Oriented Programming: Encapsulation, Inheritance & Polymorphism exam facts and rate your mastery to track revision.
Progress: 0/20 Rated 0 Mastered 0 Review Later
#1
Object-Oriented Programming organizes software design around objects containing data fields and executable methods rather than sequential logic.
#2
A class is a programmer-defined template or blueprint from which individual runtime objects are instantiated.
#3
Encapsulation bundles data variables and associated methods inside a single unit while restricting unauthorized external direct access.
#4
Abstraction exposes only necessary interface details to the user while concealing underlying algorithmic and operational complexity.
#5
Simula 67, created in Norway by Ole-Johan Dahl and Kristen Nygaard, is recognized as the first programming language featuring classes and objects.
#6
Alan Kay coined the term 'Object-Oriented Programming' during the development of Smalltalk at Xerox PARC in the 1970s.
#7
Bjarne Stroustrup developed C++ in 1979 at Bell Labs by adding classes and object-oriented features to the procedural C language.
#8
Sun Microsystems launched Java in 1995 under James Gosling, enforcing strict class-based object-oriented programming for portable network computing.
#9
Access specifiers regulate data exposure: 'private' limits access to the declaring class, 'protected' permits package or subclass access, and 'public' allows universal access.
#10
Constructors are special class methods automatically executed during object instantiation to initialize member variables.
#11
Destructors or automatic garbage collectors reclaim system memory when an instantiated object is no longer referenced in runtime memory.
#12
An interface is an abstract contract that specifies method signatures without implementing their executable function bodies.
#13
The four core pillars defining full object-oriented programming are Encapsulation, Abstraction, Inheritance, and Polymorphism.
#14
Method overloading enables compile-time (static) polymorphism by defining multiple methods in the same class with identical names but differing parameter signatures.
#15
Method overriding achieves runtime (dynamic) polymorphism by redefining a parent class method inside a child subclass with an identical signature.
#16
Dynamic method dispatch resolves method calls at runtime using a virtual method table (vtable) pointer array stored in memory.
#17
Single inheritance permits a subclass to derive from only one parent class, whereas multiple inheritance allows derivation from multiple base classes.
#18
The 'Diamond Problem' occurs in multiple inheritance when a class inherits from two classes that share a common ancestor, creating ambiguity in method resolution.
#19
Java resolves multiple inheritance ambiguities by disallowing multiple class inheritance while allowing a class to implement multiple interfaces.
#20
The principle of 'Composition over Inheritance' advocates assembling simpler objects together rather than building deeply nested class inheritance hierarchies.
Subject Specialist Commentary
Analytical perspective & practical exam advice from the Master10 academic board
Think of Object-Oriented Programming like manufacturing real-world cars. A blueprint is a class, while the physical car parked in your garage is an object. Encapsulation keeps the complicated engine hidden under the hood so drivers only touch the steering wheel. Inheritance lets a sports car inherit basic wheels and brakes from the base vehicle design. Polymorphism means pressing the accelerator pedal works whether you drive a petrol car or an electric sedan.
In competitive exams like SSC CGL and banking IT tests, questions test the four core pillars and inheritance rules. Watch out for the trap between overloading and overriding: overloading happens at compile time with different parameters, while overriding happens at runtime with identical parameters. Remember that Java does not permit multiple class inheritance because of the Diamond Problem. Memorize the four pillars using the easy acronym "APIE": Abstraction, Polymorphism, Inheritance, and Encapsulation.
Related Knowledge Topics to Discover
Looking for more GK practice?
Explore 52,789+ questions across 65 General Knowledge categories.