An object-oriented technique is a programming process that makes objects in the real world an object, as if they were parts of a machine.
This technique allows you to combine objects to create software.
The problems of structural programming can be solved.
And by making it easy to reuse and expand, high-quality software can be developed quickly and maintenance is easy.
The components of object-oriented programming are objects, classes, and messages.
Object
An object is a software module that combines functions that process data.
1. Data
Data are the information an object has, indicating its properties, status, classification, and so on.
Data is also called attributes, states, variables, constants, and data structures.
2. Function
A function is a function that an object performs, an algorithm that processes the data it has.
A function is a means of referring to or changing the state of an object.
Also called Method, Service, and Operation.
Objects have states and actions.
An object has a name that distinguishes it from other objects and has a certain memory location.
Perform an object's method when you receive a message from another object.
Class
Classing is a common type of object as a set of objects with common properties and operations.
A class is a framework that defines the properties and operations of each object.
Each object in a class is called an instance, and creating a new object from a class is called an instantiation..
Each object in the same class has a common property and behavior, has different information about its attributes, and represents different objects with the same function.
Top Class means the only class that does not have a higher class.
A superclass is a parent class of a particular class and a subclass is a child class of a particular class.
Message
A message is a means used to interact with objects, a command or requirement that instructs an object to do something.
Components of the message : the name of the object that receives the message, the name of the method that the object performs, and the factors that are required to perform the method.
The factor is an option, i.e. only used when necessary.
The receiving object that receives the message performs the required mesor and returns the result.
0 Comments