Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 138497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:16:25+00:00 2026-05-11T07:16:25+00:00

In teaching a first language to someone with no programming background I am having

  • 0

In teaching a first language to someone with no programming background I am having a hard time defining OOP despite the fact that I prefer OOP, how can I define OOP to someone with little (or zero) programming experience?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:16:25+00:00Added an answer on May 11, 2026 at 7:16 am

    You might try something like the following approach, which I modified slightly here from a post on a forum I made a while ago:

    The most basic set of vocabulary for OOP is a class, a method, and a parameter.

    A class is a set of functions that work together to accomplish a task. An instance of a class is considered an object.

    A method simply refers to a function that is encased in a class.

    A parameter is a variable that is passed into a function that instructs it how to act or gives it information to process.

    If you do a bit of digging, you’ll find a wealth of information about design patterns. Some of these might be useful to look at, though I’d be careful about getting into them too much at first because they can be overwhelming. There are two helpful (and somewhat overused) acronyms you might keep in mind when trying to get yourself into an OOP mindset: DRY and KISS.

    DRY stands for Don’t Repeat Yourself and it means just that. If you write some code, you shouldn’t have to repeat that particular code ever again. In practical terms, it means thinking more abstractly and planning a little better at the outset. I’ll give an example shortly.

    KISS stands for Keep It Simple, Stupid and means that you should try to write code that accomplishes its goal in the simplest manner possible. Simpler means fewer possibilities for errors and easier maintenance. In the context of OOP, this usually means making sure that each method or function has only one task. If you find that a method does more than one thing, it usually means that it can be refactored into several smaller methods, each dedicated to a specific task.

    Now for a simple example (someone might be able to come up with a better one, but go with me on it for now):

    Let’s say that you need to program two different forms, one that processes information about cars and one that does the same for trucks.

    For cars, we will want to record the following info:

    • Color
    • Engine Size
    • Transmission Type
    • Number of doors

    For trucks, we need:

    • Color
    • Engine Size
    • Transmission Type
    • Cab Size
    • Towing Capacity

    In procedural programming, you would write the code first to process the car form and then the code for the truck form.

    With object-oriented programming, you would write a base class called vehicle that would record the common characteristics what we need from both trucks and cars. In this case, the vehicle class will record:

    • Color
    • Engine size
    • Transmission type

    We’ll make each one of those characteristics into a separate method. The color method, for example, could take the color of the vehicle as a parameter and do something with it, like storing it in a database.

    Next, we will create two more classes: truck and car, both of which will inherit all of the methods of the vehicle class and extend it with methods that are unique to them.

    The car class will have a method called numberOfDoors and the truck class will have the methods cabSize and towingCapacity.

    Okay, so let’s assume that we have a working example for both procedural and OO programming. Now, let’s run through a few scenarios.

    Scenario 1: Suppose that we suddenly need to add a bus form, that records the following information:

    • Color
    • Engine Size
    • Transmission Type
    • Number of passengers

    Procedural: We need to recreate the entire form, repeating the code for Color, Engine Size, and Transmission Type.

    OOP: We simply extend the vehicle class with a bus class and add the method, numberOfPassengers.

    Scenario 2: Instead of storing color in a database like we previously did, for some strange reason our client wants the color emailed to him.

    Procedural: We change three different forms: cars, trucks, and buses to email the color to the client rather than storing it in the database.

    OOP: We change the color method in the vehicle class and because the car, truck, and bus classes all extend (or inherit from, to put it another way) the vehicle class, they are automatically updated.

    Scenario 3: We want to move from a generic car to specific makes, for example: Nissan and Mazda.

    Procedural: We create a new form for each make, repeating all of the code for generic car information and adding the code specific to each make.

    OOP: We extend the car class with a nissan class and a mazda class and add methods for each set of unique information for that car make.

    Scenario 4: We found a bug in the transmission type area of our form and need to fix it.

    Procedural: We open and update each form.

    OOP: We fix the transmissionType method in the vehicle class and the change perpetuates in every class that inherits from it.

    As you can see from the above scenarios, employing an OOP style has significant advantages over procedural programming, especially as your scale increases. Consider the savings we would receive from OOP in terms of repeated code, flexibility, and maintenance if we also had to add forms for boats, motorcycles, planes, go-karts, ATVs, snowmobiles, etc.

    Objects and methods are also far easier to test than procedural programming by using unit testing to test results.

    Does this mean that you should never use procedural programming? Not necessarily. If you’re doing a mockup or a proof-of-concept app, you might not have the time to make everything object-oriented and so I think it might would be better to use procedural programming for a prototype, but it would be best to make the production product in an OO-manner.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am teaching a course Introduction to Computer Programming to the first year math
I'm teaching myself programming and today's challenge is to write a program that can
When I was first started teaching myself programming, after finishing a tutorial I would
I've been teaching myself C++ and someone told me that C++ does not have
I am writing my first project that will use autoconf and teaching it to
First time dealing with json. I have a php file that processes the post
I've been teaching game programming and I've spent a lot of time talking about
This is my first week teaching myself javascript and i have run into a
I'm still teaching myself how to bind and use observable collection. One problem that
I am a teaching assistant of a introductory programming course, and some students made

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.