Post hidden from Hashnode
Posts can be hidden from Hashnode network for various reasons. Contact the moderators for more details.
Simple Explanation on OOP
INTROUCTION TO OOP Object Oriented Programming(OOP) is a programming gauge or criterion that is aimed on the concept of class and object. It also deals with the structure of a software program into simple code blueprints to create a box or boxes of individual objects
CONCEPTS OF OOP The most common concept of OOP is 'CLASS'. 'A' class is like a type in classical language. Instead of just storing size and structural information for its data, a class also stores the operations which will apply to the data. Class = Storage + Behavior. A class is like an Abstract Data Type in Pascal or C— it creates a logical coupling between data and the operations on that data.
Other concepts include ENCAPSULATION ABSTRACTION INHERITANCE POLYMORPHISM
FEATURE OF OOP Their are three(3) main features of OOP: Encapsulation Enforces Modularity: Encapsulation refers to the creation of a self binding processing functions to the data. These are data types called "classes," and one instance of a class is an "object." For example, in a payroll system, a class could be Manager, and story and cash could be two instances (two objects) of the Manager class. Inheritance Passes "Knowledge" Down: Classes are created in hierarchies, and inheritance allows the structure and methods in one class to be passed down from one hierarchy to another. That means less programming is required when adding functions in a complicated systems. Polymorphism takes any shape: Polymorphism allows that cursor to take on whatever shape is required at runtime. It also allows new shapes to be easily integrated.
IMPORTANCE OF OOP Allows object manipulation of primary unit Support abstraction over data Aids the dynamic programming model Allow the use of condition statements Keeps things secure from external use The basic element is OOP are the "class and object" which helps the development processes or stages Brings together data and its associative performance in a single location
RELATIONSHIP WITH C++ Classes and objects are the two main aspects of object-oriented programming and C++ is embedded by Classes/Objects. A class is a user-defined data type that we can use in our program, and it works as an object constructor, or a "blueprint" for creating objects. OOP helps to keep the C++ code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug.The "Don't Repeat Yourself" (DRY) principle is about reducing the repetition of code. You should extract out the codes that are common for the application, and place them at a single place and reuse them instead of repeating it.
JAVA ORIENTED PROGRAMMING OOP concepts in Java are the main ideas behind Java's Object Oriented Programming
As Java being the most sought-after skill, we will talk about object-oriented programming concepts in Java. An object-based application in Java is based on declaring classes, creating objects from them and interacting between these objects
SUMMARY The strength of OOP helps the most when writing large programs, programming in teams, and perhaps most importantly, packaging of codes into libraries for use.