Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.

Slides:



Advertisements
Similar presentations
Object Oriented Programming
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
When is Orientated Programming NOT? Mike Fitzpatrick.
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Classes & Objects Computer Science I Last updated 9/30/10.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
1 CIS601: Object-Oriented Programming in C++ Note: CIS 601 notes were originally developed by H. Zhu for NJIT DL Program. The notes were subsequently revised.
Object Oriented Programming A brief review of what you should know about OOP.
Object-oriented Programming Concepts
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
BACS 287 Basics of Object-Oriented Programming 1.
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
Introduction to Object-oriented programming and software development Lecture 1.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
An Object-Oriented Approach to Programming Logic and Design
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Objected Oriented Programming & Design JAVA Shishir Gupta (704) (704)
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Object Oriented Programming Concepts. Object Oriented Programming Type of programming whereby the programmer defines the data types of a data structure.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
1 COSC3306: Programming Paradigms Lecture 6: Object-Oriented Programming Specifications Haibin Zhu, Ph.D. Computer Science Nipissing University (C) 2003.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Object-Oriented Programming with Java Lecture 1: Introduction Autumn, 2007.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Abstraction ADTs, Information Hiding and Encapsulation.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 26 - Java Object-Based Programming Outline 26.1Introduction.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
1 Unified Modeling Language, Version 2.0 Chapter 2.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Before Object Oriented Programming (OOP) was popular, computer software was written in a Procedural style. This meant that the application/program was.
Programming Paradigms(Model) Two Paradigms: – Procedural Programming Paradigm – Object Oriented Paradigm Objective of OO approach is to eliminate some.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Object Oriented Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
CHAPTER 5 GENERAL OOP CONCEPTS.
Object Oriented Programming F3031
OOP What is problem? Solution? OOP
Object Oriented Concepts -II
Object-Orientated Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Types of Programming Languages
Object-Oriented Programming
Object Oriented Analysis and Design
Object-Oriented Programming
CIS601: Object-Oriented Programming in C++
UNIT I OBJECT ORIENTED PROGRAMMING FUNDAMENTALS
Introduction to Object-Oriented Programming
OBJECT ORIENTED PROGRAMMING
Object-Oriented PHP (1)
OBJECT ORIENTED PROGRAMMING
Presentation transcript:

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions necessary to manipulate that data within the same module or subroutine. In object-oriented programming subroutines as well as data are locally defined in objects. The difference affects the way a programmer goes about writing a program as well as how information is represented and activated in a computer. Consequently, object-oriented programming opens a new perspective for the art of programming as well as for basic computer architecture.

Object Oriented Programming is becoming (or has already become?) a buzz word in the IT-Industry. Object Oriented Programming is not just programming or coding. Its a way of thinking! Its not just a collection of new programs or programming languages, but it is a new thought process that it generated in the Object-Oriented thinker, to make the life of the programmers easier and better by structuring information in a computer. A designer is always face with the choice of building the system based on the data or on actions. Object oriented approach lays more stress on data than on actions. Any successful system inevitably undergoes numerous changes over its lifetime. The quality of architecture is depending on how well the architecture adapts the changes and not on how easily it was done. In this criteria objects have an edge over functions.

As a system evolves, its tasks may change dramatically. But the classes of data they manipulate remain persistent, atleast if viewed from sufficient level of abstraction. This helps in maintaining continuity. The top-down method was quite successful as advocated in structured programming, but it suffers from many flaws like: -The evolutionary nature of the software systems is neglected. -Real systems have no top functions. -Using the functions means data structure is neglected. -Does not promote reusability.

Object-Oriented programming is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand. Some of the features of object-oriented paradigm are: -Emphasis is on data rather than procedure. -Programs are divided into what are known as Objects. -Data structures are designed such that they characterize the objects.

Methods that operate on the data of an object are tied together in the data structure. -Data is hidden and cannot be accessed by external functions. -Objects may communicate with each other through methods. -New data and methods can be easily added whenever necessary. -Follows bottom-up approach in program design.

Data Abstraction and Encapsulation Process of defining data and relational functions as a single entity using the keyword class. ADT (Abstract Data Type) usually these ADTs are bundled with not only the data components, but also such functions, that can act upon the data components. Functions Acting upon the Data Components. Data Components Abstract Data Type User cant directly use this part User interfaces with this part.

An ADT is a collection of data (variables) and the functions that can manipulate the variables, and an OBJECT is created from an ADT. The functions that are in an ADT defined the operations that can be performed on an ADT. And an ADT is often referred to as Class. The functions that define the operations that can be performed on the variables are called methods. Class-ADT called otherwise Object-An instance of an ADT Method-The functions that operate upon the ADTs data

The term Data Encapsulation involves the logical binding of data with a specific operation. For example, in a procedural language, a local function variable is tied specifically to the logical operation of that function. The data encapsulated in the sense that it is not global and accessible to the entire program, only one small portion of it. Data encapsulation then automatically implies data hiding, or protecting. The wrapping up of data and methods into a single unit (called class) is known as encapsulation. The data is not accessible to the outside world and only those methods, which are wrapped in the class, can access it. This insulation of the data from direct access by the program is called data hiding.

Inheritance Inheritance is a mechanism of deriving a new class from an existing class. Inheritance in OOP allows a class to inherit properties from a class of objects. The parent class serves as a pattern for the derived class and can be altered in several ways. If an object inherits its attributes from a single parent, it is called Single Inheritance. If an object inherits its attributes from multiple parents, it is called Multiple Inheritance. Inheritance encourages the reuse of code since child classes are extensions of parent classes.

When, in real world, a person has a child, the Child gets the features of its parents and acquires the richness. The same way, when an ADT has a child, the child acquires the features of its parent. Also, just us with us, the child ADT also has capabilities to add more riches to itself apart from those acquired from the parent. This feature is called Inheritance.

Polymorphism Different objects behave differently to the same function calls or operations. This is polymorphism. Polymorphism is the capability of a function or method to react differently in different objects for the same message received. Polymorphism helps us reduce the number of functions that we have to remember. Polymorphism encourages extendibility of existing code. Polymorphism allows each subclass object to respond to the message format in a manner appropriate to its definition.

Polymorphism is two types 1. Compile time Polymorphism (i) Function overloading (ii) Operator overloading 2. Runtime Polymorphism Implemented using virtual functions and pointers. Example: We have three objects called Line, Circle, and Rectangle, and all these objects have an operation called Draw, who has the obvious job to do. However, when we send a Draw message to Line, Draw draws a line, when I send it to a Circle, it draws a circle and so on.