BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Object Oriented Programming (http://bzupages.com/35-object-oriented-programming/)
-   -   About Object Oriented programming full notes (http://bzupages.com/f35/about-object-oriented-programming-full-notes-1034/)

usman_akhtar 21-10-2008 04:39 PM

About Object Oriented programming full notes
 
1 Attachment(s)
This document about object oriented programing c++...
Contain good material about function and basic concept
do feed back me!!!!!!
Thanks...

.BZU. 21-10-2008 10:08 PM

Re: About programming
 
Quote:

Originally Posted by usman_akhtar (Post 2527)
This document about object oriented programing c++...
Contain good material about function and basic concept
do feed back me!!!!!!
Thanks...

Wow Usman.. The Great Job...Your first contribution and really important...You have attached about all those lectures that Madam taught us before mid term exams...
Here is the some part of the attached file..
For full and easy learning download the attachment above...





Procedural programming
Conventional programming using high level languages such as COBOL, C and FORTAN are known as procedural oriented programming. Procedural programming employs top down programming approach where a program is viewed as a sequence of task to be performed. A number of functions are written to implement these tasks
Characteristics of POP
1. Emphasis is on doing things.
2. Large program are divided into smaller one known as function.
3. Most of the functions share global data.
4. Functions transfer data from one from to another.
5. Employs top down approach in program design.
6. Data move openly around the system from function to function.
Limitation of POP against OOP
1. POP emphasis is on doing things (algorithm) but OOP emphasis is on data rather than procedure.
2. In a multi-function program many important data items are placed as global so that they may be accessed by all the functions. Global data are more vulnerable to an inadvertent change by a function. This provides an opportunity for bugs to creep in.
3. The procedural approach doesn't model real world problems very well. This is because functions are action oriented and do not really corresponds to the elements of the problem.
4. In POP functions transform data from one form to another but in OOP new data and functions can be easily added whenever necessary.
5. Data move openly around the system from functions to functions in POP but in OOP data is hidden and cannot be accessed by external functions.
OBJECT ORIENTED PROGRAMMING (OOP)
OOP as an approach that provides a way of modularizing programs by creating partition memory area for both data and function those can be used as templates for creating copies of such modules on demand. Object is considered to be partitioned area of computer memory that stores data and set up operations that excess data. Object can be used in variety of different program without any modification.
FEATURES OF OOP'S:
1. Emphasis is on data rather than procedure.
2. Program is divided into objects.
3. Data structure is designed such that they characterize the objects.
4. Data is hidden and cannot be accessed by external function.
5. Function that operates on the data of objects is tied together in data structure.
6. Object may communicate with each other through functions.
7. New data and function can be easily added whenever necessary.
8. Follow bottom up approach.
OBJECT ORIENTED LANGUAGE:
OOL can be classified into two categories:
1. Object based programming language.
2. Object oriented programming language.
Object based programming language is the style of programming that primarily supports encapsulation and object identity. Its features are:
1. Data encapsulation.
2. Data hiding and access mechanism.
3. Automatic initialization and clear up of objects.
4. Operator loading.
Object oriented programming language incorporates all of object based programming features along with two additional features namely inheritance and dynamic binding.
BASIC CONCEPTS OF OOP
OOP's should include the following things:
1. Object
2. Class
3. Data abstraction and encapsulation
4. Inheritance
5. Polymorphism
6. Dynamic
7. Message passing
1. Object:
·Basic run time entities in object oriented system.
·Program object should be present such that they match closely with real world object
·Each object contains data and code object to manipulate data
2. Class:
Class is the collection of object of similar type.
E.g. mango, apple and orange are the object of class fruit.
3. Data abstraction and encapsulation:
·The wrapping up of data and functions into a single unit (called class) is known as encapsulation.
·Data encapsulation is the most striking feature of a class.
·The data is not accessible to the outside world and only those functions which are wrapped in the class can access it. These functions provide the interface between objects, data and the program. This encapsulation to the data from direct access from program is called data hiding or information hiding.
·Abstraction refers to the act of representing essential features without including the background details or explanation.
·Class used the concept of abstraction and are defined as list of abstraction attributes such as size, weight cost function to operate on these attribute.
·Since the classes use the concept of data abstraction they are known as abstract data type (ADT).
4. Inheritance:
·Inheritance is the process by which objects of one class acquires the properties of objects of another class.
·It supports the concept of hierarchical classification.
The concept of inheritance provides the idea of reusability.
5. Polymorphism:
·It is a Greek term means ability to take more than one form.
·An operation may exhibit different behavior in different instances. The behavior depends upon the types of data used in the operation.
·Polymorphism is extensively used in implementation of inheritance.
Types: 1. Operator overloading
2. Function overloading
1. Operator overloading
·The process of making an operator to exhibit different behavior in different instances is known as operator overloading.
·For two numbers the operator '+' will generate a sum.
·If overloaded the operands in strings will produce the third string by concatenation. For e.g. Hello + world = Helloworld
2. Function overloading
·Using a single function name to perform different types of tasks is known as function overloading.
6. Dynamic binding:
Binding refers to the linking of a procedure called to the code to be executed in response to the call.
Dynamic binding also known as late binding means that the code associated with a given procedure called is not known until the time of the call at the run time.
It is associated with polymorphism and inheritance.
7. Message passing:
Steps involved in message passing are:
·Creating classes that define objects and their behavior.
·Creating objects from class definition.
·Establishing communication among object.
E.g. employee. salary (name)

Benefits of OOP's:
Object orientation contributes to the solution of many problems associated with the development and quality of software products. The new technology promises greater programmer productivity, better quality of software and lesser maintenance cost. It implies the concept of code reusability. The principal advantages are:
1.Through inheritance we can eliminate redundant code and extend the use of existing.
2.Classes.
3.We can build programs from the standard working modules that communicate with one another, rather than having to start writing the code from scratch. This leads to saving of development time and higher productivity.
4.The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program.
5.It is possible to map objects in the problem domain to those in the program.
6.It is possible to have multiple instances of objects to coexist without any interference.
7.It is easy to partition the work in a project based on objects.
8.The data centered design approach enables us to capture more details of a model in implement-able form.
9.Object oriented systems can be easily upgraded from small to large systems.
10.Message passing techniques for communication between objects makes the interface description with external systems much simpler.
11.Software complexity can be easily managed.

APPLICATION OF OOP'S:
Application of OOP's technology has gained importance in all most all areas of computing including real time business system. The promising areas are:
·Real time systems.
·Simulation and modeling.
·Object oriented data base.
·Hypertext, hypermedia and expert text.
·AI and expert system.
·Neural networks and parallel programming.
·Decisions support and office automation systems.
·CIM/CAM/CAD systems.


All times are GMT +5. The time now is 10:01 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.