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
- #1Object-Oriented Programming organizes software design around objects containing data fields and executable methods rather than sequential logic.
- #2A class is a programmer-defined template or blueprint from which individual runtime objects are instantiated.
- #3Encapsulation bundles data variables and associated methods inside a single unit while restricting unauthorized external direct access.
- #4Abstraction exposes only necessary interface details to the user while concealing underlying algorithmic and operational complexity.
- #5Simula 67, created in Norway by Ole-Johan Dahl and Kristen Nygaard, is recognized as the first programming language featuring classes and objects.
- #6Alan Kay coined the term 'Object-Oriented Programming' during the development of Smalltalk at Xerox PARC in the 1970s.
- #7Bjarne Stroustrup developed C++ in 1979 at Bell Labs by adding classes and object-oriented features to the procedural C language.
- #8Sun Microsystems launched Java in 1995 under James Gosling, enforcing strict class-based object-oriented programming for portable network computing.
- #9Access specifiers regulate data exposure: 'private' limits access to the declaring class, 'protected' permits package or subclass access, and 'public' allows universal access.
- #10Constructors are special class methods automatically executed during object instantiation to initialize member variables.
- #11Destructors or automatic garbage collectors reclaim system memory when an instantiated object is no longer referenced in runtime memory.
- #12An interface is an abstract contract that specifies method signatures without implementing their executable function bodies.
- #13The four core pillars defining full object-oriented programming are Encapsulation, Abstraction, Inheritance, and Polymorphism.
- #14Method overloading enables compile-time (static) polymorphism by defining multiple methods in the same class with identical names but differing parameter signatures.
- #15Method overriding achieves runtime (dynamic) polymorphism by redefining a parent class method inside a child subclass with an identical signature.
- #16Dynamic method dispatch resolves method calls at runtime using a virtual method table (vtable) pointer array stored in memory.
- #17Single inheritance permits a subclass to derive from only one parent class, whereas multiple inheritance allows derivation from multiple base classes.
- #18The 'Diamond Problem' occurs in multiple inheritance when a class inherits from two classes that share a common ancestor, creating ambiguity in method resolution.
- #19Java resolves multiple inheritance ambiguities by disallowing multiple class inheritance while allowing a class to implement multiple interfaces.
- #20The 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
Computer & Digital Awareness
Algorithms: Computational Logic, Complexity Analysis & Problem-Solving
Explore Topic
Computer & Digital Awareness
Why Do Computers Use Binary Instead of Decimal?
Explore Topic
Computer & Digital Awareness
Packet Switching and How the Internet Transmits Data
Explore Topic
Computer & Digital Awareness
What Is the Internet of Things and How Do Connected Devices Exchange Data?
Explore Topic
Computer & Digital Awareness
RAM vs ROM: Primary Storage, Volatility & Memory Architecture
Explore Topic
Computer & Digital Awareness
Operating Systems: Kernel Architecture, Process Scheduling & Resource Management
Explore Topic
Looking for more GK practice?
Explore 52,789+ questions across 65 General Knowledge categories.