Close Menu
geekfence.comgeekfence.com
    What's Hot

    I Use One UI 9 Daily – This Hidden Feature is a Game-changer

    July 6, 2026

    The Science Behind Why Soccer Players at the 2026 World Cup Are Cutting Their Socks

    July 6, 2026

    Expanding our Heat Resilience data to 50+ global cities

    July 6, 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 Read4 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

    The Medium RSS Feed’s Missing Part

    July 6, 2026

    Grafana’s Approach to AI-Native Observability

    July 4, 2026

    Spring Boot OAuth2: Secure Authentication and Authorization

    July 3, 2026

    We Tried Agile and It Didn’t Work

    June 30, 2026

    Software-Defined Warfare: Crossing the Chasm in Two Software Areas

    June 29, 2026

    SE Radio 726: Scott Kingsley on the Swagger Ecosystem

    June 28, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202559 Views

    Hard-braking events as indicators of road segment crash risk

    January 14, 202631 Views

    Redefining AI efficiency with extreme compression

    March 25, 202628 Views
    Don't Miss

    I Use One UI 9 Daily – This Hidden Feature is a Game-changer

    July 6, 2026

    What’s the actual point of One UI 9? Before I installed the beta of Samsung’s…

    The Science Behind Why Soccer Players at the 2026 World Cup Are Cutting Their Socks

    July 6, 2026

    Expanding our Heat Resilience data to 50+ global cities

    July 6, 2026

    Fable 5 Returns, Sonnet 5 Gets Cheaper, But European Banks Still Can’t Deploy Either on Azure |

    July 6, 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

    I Use One UI 9 Daily – This Hidden Feature is a Game-changer

    July 6, 2026

    The Science Behind Why Soccer Players at the 2026 World Cup Are Cutting Their Socks

    July 6, 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.