#What exactly is Object Oriented Programming

1 messages · Page 1 of 1 (latest)

odd compass
#

what exactly is Object Oriented Programming?

google keeps say:
"OOPS tries to map code instructions with real world making the code and easier to understand"

what does it mean by "real world", i understand it makes the code short and easier to read... but real world? like what?

thorny crownBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
What exactly is Object Oriented Programming? google keeps say: "OOPS tries to map code instructions with real world making the code and easier to understand" what does it mean by "real world", i understand it makes the code short and easier to read... b

nd and maintain."

In simple terms, Object Oriented Programming (OOP) is a programming paradigm that focuses on creating objects that contain data (attributes) and methods (functions) to manipulate that data. This approach allows for the organization and structure of code to closely mimic real-world objects and relationships, making it easier to understand and maintain.

OOP is based on four main principles: inheritance, encapsulation, polymorphism, and abstraction.

  • Inheritance allows for the creation of new classes by extending existing classes, inheriting their attributes and methods.
  • Encapsulation involves bundling data and methods within a class to restrict access from outside sources.
  • Polymorphism allows objects to take on different forms or behaviors through method overriding or interfaces.
  • Abstraction focuses on reducing complexity by hiding unnecessary details and exposing only relevant information.

By using OOP concepts, developers can write more modular, reusable, and scalable code. Java is an object-oriented language that fully embraces these principles, making it a popular choice for OOP development.

Overall, Object Oriented Programming is a powerful approach to software development that enhances code organization, maintainability, and flexibility by modeling real-world entities as objects with attributes and behaviors.

odd compass
#

"mimic real-world objects and relationships" again what 😭

young locust
#

So you can for example create a Person object

#

that will have a name and age

#

such person may have private information

#

Then there is inheritance

#

where a Square object can inherit a Rectangle object

#

and once you have objects

#

you can call methods on them to make them do something

#

so you could do person.walk()

odd compass
#

so like a big big function?

#

with sub functions?

young locust
odd compass
#

like to understand it, its like a big function, with many different functions in it linked to each other; like a tree

young locust
#

what is that ?

trail pier
#

the actual method can do anything

young locust
#

OOP ? Object ? Method ?

#

what are you talking about ?

trail pier
#

the walk method ig

odd compass
young locust
young locust
odd compass
#

so OOP it self is nothing, its a term which is used to work with "different things" related to each other

young locust
#

It's a concept which explain a way to do programming

odd compass
young locust
#

OOPS says that you have classes from which you creates objects

#

and you can call methods on objects

#

to do different things

odd compass
#

i seee