#What exactly is Object Oriented Programming
1 messages · Page 1 of 1 (latest)
<@&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>.
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.
"mimic real-world objects and relationships" again what 😭
The idea is to work with objects
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()
wdym
like to understand it, its like a big function, with many different functions in it linked to each other; like a tree
what is that ?
the actual method can do anything
the walk method ig
what is the "it's" ?
oop
It wouldn't make sense if it was that
OOP is a concept, it's not related to anything
ahhh okokok makes sense now
so OOP it self is nothing, its a term which is used to work with "different things" related to each other
It's a concept which explain a way to do programming
i~ okay now it makes sense
OOPS says that you have classes from which you creates objects
and you can call methods on objects
to do different things
i seee