Close Menu
geekfence.comgeekfence.com
    What's Hot

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    With a feel for physics, AI models simulate a wider range of real-world scenarios | MIT News

    August 13, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Software Engineering»OOP: Object Oriented Programming
    Software Engineering

    OOP: Object Oriented Programming

    AdminBy AdminJuly 2, 2026No Comments3 Mins Read6 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    OOP: Object Oriented Programming
    Share
    Facebook Twitter LinkedIn Pinterest Email


    OOP: Object Oriented Programming

    Object Oriented Programming (OOP) is a programming paradigm that is the cornerstone of modern software development. While OOP isn’t the only programming paradigm that exists, I would argue it is the most important to have a firm foundation of, and when used correctly, can lead to stronger and more robust software. But what is OOP and how can you make sure to understand it well? Let’s explore.

    High Level

    At a high level, in OOP there are 3 main pillars to understand for getting OOP down:

    • Encapsulation with classes
    • Inheritance
    • Polymorphism (the most important by far)

    Encapsulation

    Encapsulation is the ability to enclose data that describes the object and the functions used to manipulate that data into one module container.

    In OOP these are typically called classes and are at the center of the paradigm. The resulting variable when the variable is declared is called an object. An important part is abstraction so that only necessary features are exposed.

    • Private/Internal: Methods and properties are accessible from other methods of the same class. Anything outside of the class shouldn’t be able to access these members/methods. This is typically denoted by Private or Protected.
    • Public/External: Methods and properties are accessible from outside the class.

    An example would be if you were programming a card game. In your card dec class, would you want someone else to modify the number of cards in the deck? Probably not.

    Inheritance

    Inheritance is the ability to take an existing class and extend its functionality to form another class.

    Why is this important? Because it supports reusability with code reuse. This is because the new class has access to all of the parent functionality. The child class just needs to add new attributes and methods that are specific to its needs.

    • Generalization is the relation such that the subclass is a variation of the parent. I.e. a pickup truck “is-a” automobile.
    • Specialization is the relationship such that the class “has-a” subclass. I.e. an automobile “has-a” engine.

    Polymorphism

    Polymorphism is the ability of similar objects to respond differently to the same message.

    The final pillar of OOP is closely related to inheritance and yet is arguably far more important. The prefix poly means many; morph means form. Polymorphism then refers to the ability of a single type or class to take many forms.

    How is this done? With method overriding:

    In the example above, you can see that both the electric car and the pickup truck inherit from Automobile and both override the Start behavior since both have vastly different needs. An electric car doesn’t need to start an engine while a pickup truck would (assuming it’s of the gas variety).

    Key Takeaways

    1. Well designed objects manipulate the data or state of an object by passing messages through the object’s interface.
    2. Controlling an object through its interface guarantees it behaves in a safe manner and that the internal state remains valid.
    3. The ability to model the real world is an important advantage of OOP.
    4. Objects must be self-contained so that they can stand on their own.

    OOP isn’t the only programming paradigm out there. Can you name any others? Follow me on twitter for more programming posts!


    OOP: Object Oriented Programming was originally published in Geek Culture on Medium, where people are continuing the conversation by highlighting and responding to this story.





    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    SED News: The Kimi Moment, Runaway AI, and Tokenmaxxing

    August 11, 2026

    Jason Gorman on The Effective Use of AI For Software Development – Software Engineering Radio

    August 7, 2026

    The Terminal as an Agentic Interface

    August 6, 2026

    Sonali Varde on AI and the Engineering Manager Role – Software Engineering Radio

    August 2, 2026

    Docker and Sandboxing AI Agents

    August 1, 2026

    Tabs Versus Spaces: Defining a Coding Standard

    July 30, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202576 Views

    The Next Paradigm in Efficient Inference Scaling – The Berkeley Artificial Intelligence Research Blog

    May 16, 202642 Views

    Is it too late to start learning AI and machine learning in my 30s or 40s?

    April 9, 202637 Views
    Don't Miss

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Independent MP Andrew Wilkie has taken the fight over gambling reform to the National Anti-Corruption…

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    With a feel for physics, AI models simulate a wider range of real-world scenarios | MIT News

    August 13, 2026

    Monitoring beyond SNMP: Turning your network into a sensor

    August 13, 2026
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.