Object-Oriented Programming:
In object-oriented programming, each program is developed as a component that can be used in more than one project. This type of programming thus achieves component reusability, i.e., the capability to develop well-designed program modules that perform a specific task (such as handling printer output). Component reusability enables programmers to quickly develop a program by combining ready-to-use modules.
In traditional programming, the program and data are kept separate. If the data is changed, then all the programs that access this data also have to be changed. For example, if a company decides to incorporate the total man-hours in addition to workdays in its payroll, all programs that use such data need to be changed.
In object-oriented programming, the problem of updating data and programs is solved by eliminating the distinction between programs and data. The data is stored along with other programs and procedures needed to access and use this data. If another program accesses the data, it immediately learns which procedures are available, including any new method. Also, the modules created in object-oriented programming need not be modified when a new object is added. The programmer has to just create a new object which inherits the features of the existing objects. All these eliminate the need to change programs when there is a change in data.
Object-oriented programming involves a more flexible system organization as unlike the processes and procedures that vary too often, the system objects change only occasionally. Java, .NET, C++, etc. support object-oriented programming principles.
Basic Concepts in Object-Oriented Programming
Object orientation has become a major standard for modern software development. It has brought several benefits to software development, and integrates a lot of new concepts, new development approaches, and new vocabulary. Object-oriented programming handles complex problems better than the procedural approach. Some of the basic terms in objected-oriented programming are introduced here. They are: class, object, abstraction, encapsulation, polymorphism, and inheritance. Further discussion on object-oriented programming is outside the scope of this book.
Class
Most of the objects in the real world are similar in one way or another. For example, there are many vehicles that exist in the entire world and many of them may be of the same model. Each vehicle might have been built using similar blueprints and therefore contain identical components. In object-oriented programming, the vehicle is considered to be a class from which the individual objects are created. A class constitutes a set of objects that share a common structure and behavior.
Object
An object plays a key role with respect to a request for an operation. The request invokes the operation that defines some action to be performed. Examples of objects are book, car, table, television, etc. Objects have their own state and behavior, and these in turn define the relationship. All the objects that exist in the real world basically share two common characteristics. These are state and behavior. For example, people have a state like angry, hungry, and happy. They exhibit these states by their behavior like shouting, eating, and smiling. Before learning object-oriented programming, it is mandatory to identify the states and behaviors of the objects.
Abstraction
Abstraction refers to the process of hiding the complexity and internal functionality of objects. This can be best understood through a real world analogy. For example take the functioning of a television. We use the television but we are not concerned about the internal mechanism that makes a television to display images.
Encapsulation
Encapsulation binds together the code and the data it manipulates. It acts as a warehouse of the data and functions which are all organized into a single unit called class. It helps prevent arbitrary data access. The data cannot be accessed by the external world. Access is permitted only to the functions that are stored in the class. Because of encapsulation, the code can be accessed without bothering about the implementation details.
Polymorphism
Polymorphism is the property of a function by which it can exhibit different behaviors based on different input values. Poly, in Greek, means ‘more than one'. Different sets of code in the function will be executed based on the inputs.
Suppose we have to write a function, say draw( ), to draw a circle or a rectangle. The function can be programmed to draw a circle if the input given is radius; if length and breadth are given as inputs, the portion of the code that is programmed to draw a rectangle will be executed. The specific action to be taken is identified on the basis of the inputs given to the program.
Inheritance
Inheritance refers to the process by which one object acquires the general properties such as the conditions and actions of other objects. There can be one or more levels of hierarchy. Inheritance helps in reuse of the code. For example, from a class ‘vehicle,' different categories of vehicles can be derived (i.e., car, bus, van, etc.). These subcategories will share some common features of the generic class vehicle.
Email based Information technology and system assignment help - homework help at Expertsmind
Are you searching Computer science expert for help with Object-Oriented Programming – An Overview questions? Object-Oriented Programming – An Overview topic is not easier to learn without external help? We at www.expertsmind.com offer finest service of Information technolgy and system assignment help and Information technology homework help. Live tutors are available for 24x7 hours helping students in their Object-Oriented Programming – An Overview related problems. We provide step by step Object-Oriented Programming – An Overview question's answers with 100% plagiarism free content. We prepare quality content and notes for Object-Oriented Programming – An Overview topic under Information technology theory and study material. These are avail for subscribed users and they can get advantages anytime.
Why Expertsmind for assignment help
- Higher degree holder and experienced experts network
- Punctuality and responsibility of work
- Quality solution with 100% plagiarism free answers
- Time on Delivery
- Privacy of information and details
- Excellence in solving Information Technolgoy and system queries in excels and word format.
- Best tutoring assistance 24x7 hours