Object Oriented Programming Concepts
| Before everything else, what is OOP?
OOP also composes of structure that makes it OOP. There are Class, Objects, Properties, and Methods.
Structures of Object Oriented Programming
Class: These are user-defined data types. A class can reuse elements when making multiple instances of that data type. The objects which are under the same class shares the same attributes and behaviors.
Object: These are which gives the data a state which can also be called behaviors. These behaviors can be defined from a Java code piece called a method.
Method: These are functions that define what an object does in a class. When a method is declared in a class, it first refers to an instance of that class. These instance methods are subroutines belonging to an object. Programmers use these techniques to keep functionality within a single object or to make the code reusable.
Attribute: These are what defines the state of an object under the class.
Four main Principles of Object Oriented Programming
Encapsulation: This technique makes all the interactions occur through methods of an object, thereby encapsulating the object's internal state. Think of it as a box where only the necessary parts are visible and everything inside is closed to the rest of the world. This prevents external tampering and misuse, contributing to data cleanliness.
Inheritance: This technique allows a new class to derive properties and
methods from an already existing class. It allows code reusability, which
reduces repetition. The "Car" class will inherit properties and
methods from the "Vehicle" class and may have additional features
particular to "Car." For example, if you have a class called
"Vehicle" that has properties such as "speed" and
"color," and methods such as "drive" and "stop,"
you can create a new class called "Car" that inherits from
"Vehicle."
Polymorphism: The ability to treat objects as if they
were of their parent class type instead of their own type. It helps build
flexible systems that manage multiple kinds of objects using only one
interface. For example, you might have a method that accepts an object of type
"Vehicle." In this case, polymorphism allows you to pass an object of
type "Car," "Truck," or "Motorcycle" to that
method, and it will handle each one according to its own implementation.
Abstraction: This concept reduces the complexity of complex systems by modeling classes relevant to the problem and operating on a higher level of abstraction. It makes it possible for programmers to hide all information about an object except what is necessary, thus simplifying and promoting productivity.
Overall, Object-oriented programming is a flexible yet strong style of programming in modern software development. It gives programs a defined structure that makes programs easier to create, manage, and grow by way of encapsulating data and action into objects. OOP provides a framework that allows one to facilitate productive and efficient coding processes, no matter the size of the project or application. However it does require a certain amount of maintenance and time in order to achieve a proper proposed project with OOP.
Reference:
.png)
.png)

Utilize bold or italicized text to emphasize important terms or concepts throughout the blog post.
ReplyDeleteThis is noted, Thanks!
DeleteI suggest changing your header to an easy-to-read color to attract viewers.
ReplyDeleteWill do, thank you.
DeleteI would suggest you to use easier words so that any one can understand it, other than that great blog!
ReplyDeleteI suggest using accurate colors for heading
ReplyDelete