Object Oriented Programming Using(JAVA)

JAVA

oop

Java is an object-oriented programming languag Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since Oak was already a registered company, so James Gosling and his team changed the name from Oak to Java.

Object Oriented Programming (OOP)

Object Oriented Programming (OOP) To solve the problem in OOP, first we prepare a model of entities related to the problem which are called objects. In fact, objects are groups of related data and functions. These are also called basic run time entities in object oriented system. These represent the real-world entities of the problem such as students, customers, products that the program has to handle. In the real world, every entity has some data and functions. For example, if the entity is a student, then name, marks, percent etc. can be its data and getdata, putdata etc. can be its functions. The data contained in an object can be accessed only by the functions of that object. But the functions under one object can also be accessed by the functions of another object. Thus in OOP the data remains hidden and protected from external objects.

principles of object oriented programming

  Object: This entire world is an object. That which can be recognised, which has its own shape, structure and behaviour, is called an object; Like cup-plate, tray etc. Every thing has a definite reason for its existence and it has its own behavior. A person can also be placed in the category of an object, because he has his own distinct identity and behavior. People keep in touch with each other. in the absence of contact It is quite impossible to direct everything towards a common end. object oriented programming This is also the main basis of style. A sample of the experiment is prepared by collecting various objects, which They exchange various information among themselves to achieve public goals. An object is an instance of a class. Knowledge about the conduct and behavior of the class is obtained through objects. The value of variables declared in the class is changed only with the help of object and public functions.

  CLASS: Class is based on object oriented programming class. Various types of classes were created in it And each class has its own definite characteristics. We know that the object of programming Oriented style is a group of different objects, which together achieve a set goal. an object Program oriented is the description, structure and behavior of these objects. The structure of an object is described by its members and its behavior is described by its member functions. Class arises from structure and behavior. In this way we can say that by introducing them in an application and using them in classes. Creating a model is object oriented programming. Computer programmer defines various behavior and methods in the form of classes. The compiler and the computer have no knowledge about the date, hence the programmer must store the data in this manner. Must be defined, which can display the date. For this, the behavior of its date will have to be defined by a class named date. This class will demonstrate the syntax of the date and the possible operations that can be performed on it. Just as any other variable is declared with a data type, objects of the date class will also be defined in the same way. A class specifies what types of data and functions are included in the objects of the class. It can also be said that class works like a blue print or map. A class is a group of different functions and variables. In any object oriented program, it is necessary to declare at least one class.

   Data Abstraction: Summarization of data Data Abstraction Summarization of data means simplification of complexity. Let us explain it this way, we kick the scooter to start it, and by kicking the scooter starts. We do not need to know why the scooter started due to kicking, what process was adopted inside the scooter for this, this quality itself is called abstraction.

   Data encapsulation: Data encapsulation combines data structure and functionality into objects in object-oriented programming style. It describes the internal form of the object It both hides from the user and also informs about the objects that can be used. Data encapsulation can also be called encapsulation of functions and data. Due to this feature of object oriented programming style, we can protect both the program and the data from external interference. Encapsulation of functions and data can also be imagined in such a way that they are enclosed in a capsule. This capsule determines that functions and data co-exist and can neither be directly observed nor used Question 6.00 Thus the capsule protects the functions and data of an object and acts as a protector against unauthorized access. 

  Inheritance: This important and useful feature of object oriented programming style. Through inheritance the characteristics of one class can be acquired from another class. This important method provides new dimensions to our program. Object-oriented programming allows us to create our own data types, i.e. classes, with behavior similar to the regular data types of the language. Even instead of using predefined data types, one can experiment by creating blocks of other classes with the classes determined by the programmer. By using the concept of inheritance, it is possible to create new classes from old classes. The new class is called derived class and the old class from which it is created is called base class. This derived class has equal rights over the data structures and functions of the original class. This new class can add new data and functions to the data and functions taken from the original class. Following are the main features of succession- (i) Establishes a relationship between different classes.

(ii) Provides the facility to reuse the properties of one class in another class.

(iii) If one class inherits from another class and the second class inherits from a third class, then all the qualities of the third class will automatically be included in the first class. Understand the concept of inheritance in object oriented programming as follows. Mammals include many animals like bat, dog, horse and human etc. All these animals have a common quality that their offspring are born in the form of babies and not in the form of eggs. All these animals provide milk to their offspring from the breasts of female animals

  Polymorphism: Polymorphism means one form or many functions. In object oriented programming style, any work can be done accordingly in different circumstances. Polymorphism provides the facility to use objects of the same external structure with internal differences. For example, if there are three different types of programs for drawing a square, circle and triangle. A function draw() has been defined to draw these shapes. Now, whichever program the user calls from the above three programs through this function, the same drawing will be created.

  Message Passing: A program prepared in object oriented programming style is a group of many objects. These objects send and receive messages to each other as needed. The message for an object is to execute a certain process or function, so after receiving the message the object executes a certain process and presents the result.

Thanks for reading my blog I hope like it.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top