1 unit (oops)

2,486
-1

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,486
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
81
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

1 unit (oops)

  1. 1. Introduction to Object Oriented Programming
  2. 2. Evolution of Programming Paradigms• Structured Programming – Large programming project – Emphasis on algorithm rather than data – Programs are divided into individual procedures that perform discrete tasks – Procedures are independent of each other as far as possible – Procedures have their own local data and processing logic
  3. 3. Evolution of Programming Paradigms – Parameter passing facility between the procedures for information communication – Introduced the concept of user defined data types – Support modular programming – Projects can be broken up into modules and programmed independently – Scope of the data items is controlled across modules – Maintenance of a large software system is tedious and costly
  4. 4. Object oriented programming language• Object oriented programming is a method of implementation in which programs are organized as co- operative collection of objects, each of which represents an instance of some class and whose classes are all members of hierarchy of classes united through the property called inheritance.• Object Based Programming Languages – Encapsulation – Object Identity• Example – Ada• Object Oriented Programming Languages – Object Based features
  5. 5. Object oriented programming language – Inheritance – Polymorphism• Example – C++, Java, Smalltalk, Eiffel• Developed by Bjarne Stroustrup at AT&T Bell Laboratories in USA• Incremented version of C• Superset of C
  6. 6. Evolution of Programming Paradigms• Object Oriented Programming – OOP treats data as a critical element – Emphasis on data rather than algorithm – Decompose the problem into number of entities namely objects – Doesn’t allow data to flow freely around the system – Data is hidden and cannot be accessed by external function
  7. 7. Evolution of Programming Paradigms – Data and the functions that operate on the data are tied together in the data structure – Object may communicate with each other through functions – New data and functions can be added whenever necessary – Follows bottom up approach
  8. 8. Basic Concepts of Object Oriented Programming• Object• Classes• Data abstraction• Encapsulation• Inheritance• Polymorphism• Dynamic Binding• Message Passing
  9. 9. Basic Concepts of Object Oriented Programming• Object – Objects are the basic run time entities in an object oriented system – Object is a instance of class – We can say that objects are variables of the type class – Objects can be student, employee, car, book, etc
  10. 10. Basic Concepts of Object Oriented ProgrammingObject representation
  11. 11. Basic Concepts of Object Oriented Programming• Classes – A class is a user defined data type. – A class is a collection of data member and member functions. – Variable declared in class are called data member and functions declared in class are known as member functions. – A class is an abstraction of the real world entities with similar properties. – A class identifies a set of similar properties. – A class is an implementation of abstract data type.
  12. 12. Basic Concepts of Object Oriented Programming• Data Abstraction – Abstraction refers to the act of representing essential features without including the background details or explanations. – Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight, cost etc.
  13. 13. Basic Concepts of Object Oriented Programming• Encapsulation – The wrapping of data and functions into a single unit is known as encapsulation. – The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it.
  14. 14. Basic Concepts of Object Oriented Programming• Inheritance – Inheritance is the process by which objects of one class acquire the properties of objects of another class. – Create a new class from existing class. – The main benefits of the Inheritance is code reusability. • Add additional features to an existing class without modifying it.
  15. 15. Basic Concepts of Object Oriented Programming• Polymorphism – Polymorphism is a Greek term. – It means the ability to take more than one form. – An operation may exhibit different behaviors in different instances. – The behavior depends upon the type of data used in the operation. • For adding two number operation will generate sum of two number. • For adding two string operation will concate two string.
  16. 16. Basic Concepts of Object Oriented Programming• Dynamic Binding(Late Binding) – Binding refers to the linking of a procedure call to the code to be executed in response to call. • Dynamic binding means that the code associated with a given function call is not known until the time of the call at run time.
  17. 17. Basic Concepts of Object Oriented Programming• Message Passing – Objects communicate with one another by sending and receiving information. Student.setData(Id, Name); Object Message Information
  18. 18. Advantages of OOP• Through inheritance, redundant code is eliminated and extend the use of existing classes.• One can build programs from the standard working modules that communicate with one another. – No need to write from scratch. – Save the development time and increase the productivity.• The principal of data hiding helps the programmer to build the secure program.
  19. 19. Advantages of OOP• The data centered design approach enable programmer to get details of a model in implementable form.• Possible to map objects in the problem domain to those in the program.• It is easy to partition the work in project based on objects.• Easily upgradable from small system to large system.• Software complexity can be easily managed.
  20. 20. Application of OOPWhat are the applications of OOP?What are the application of C++?

×