Explain in briefly the object oriented programming
Answers
Object oriented programming
you know that a computer program is a sequence of instructions given to a computer to get the attacks done programming techniques in almost all the computer languages are the same but every programming language uses a certain character set operator keyboard, data types ,. we have been saying that java is an object oriented programming language but how does it differentiate itself from the rest of languages?
conventional programming using using high level languages such as c o b o l and C is a commonly known as prosedure or oriented programming in the procedure oriented approach the problem is viewed as a sequence of things to be done if statement in the language tell the computer to do something that some input and this number multiple and display the output a program is a procedural language is a list of instructions are number of functions are written to accomplish this tax in processor Dural oriented language is the primary focus is on functions.
in procedural oriented languages we write a list of instructions for the computer to follow and organise instructions in into groups known as functions
Basic concepts of object oriented language
Objects:
and objectives anything that can be represented by the data in the memory of a computer manipulated by the computer program an object can be punctual item in the physical world or just clear idea for example most aeroplanes have a computer called an autopilot that can fly the plane the autopilot is a computer that manipulate and object in the physical world most of that that computer manipulate however they are not physical objects payroll information student record bank account and other character in a video game are example of object that are not physical objects was simplify concept ideas represented in the memory of a computer whether an object and object actually exist in the physical world does not matter much in a term of what happen inside the computer to a computer and object is simply something that can be represented by the data in a cup kam MB and 1/2 litre by the computer programs that are that represent the object is organised into the set of properties is property describes the object in some ways for example that takes an example of an aeroplane the weight of an aeroplane its location direction in which the plane is facing are all the properties of the aeroplane a computer manipulate and observed by changing sum of its property the program that manipulate the properties of an object are called object methods you can think of an object as a collection of properties and the methods that are used to manipulate these properties the value stored in the properties of the object at any one time are called state of objects.
Classes:object contain data and go to manipulate data the entire set of data and code of an object can be made a user defined data type with the help of a class in fact object of variable of type class 1 class has been define we can create any number of object belonging to that class each object is associated with the number the data of type class with which they are created a glass is just a collection of object of similar type for example of car scooter and motorbike a member of a class vehicles classes are user defined data type and behave like the built-in types of a programming language. for example if a vehicle has been has been defined as class then the statement vehicle car will create an object ka belonging to the class vehicle.
Data encapsulation and abstraction:the wrapping up the data and functions into a single unit is known as is kept capsulation data encapsulation is a most striking feature of a class that data is not accessible to the outside world and only those functions which are trapped in a class can ss8 it refer to the act of representing essential feature without including background detail or explanation.
Inheritance:inheritance is a process by which object of one class acquired the properties of a object of another class it support the concept of hierarchical classification for example the grandchildren is a part of class 10 in which is again the part of class grandparents in reasoning classes is called base class and class which acquired the feature of the base class is called as derived class then you class which have the combined combined feature of both the classes.
Polymorphism:polymorphism was another important op concept it is the great term mean the ability to take more than one form and operation may exhibit different kinds of behaviour in different instances the behaviour depend upon the type of data used in the operation