Programming Paradigms(Model) Two Paradigms: – Procedural Programming Paradigm – Object Oriented Paradigm Objective of OO approach is to eliminate some.

Slides:



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

When is Orientated Programming NOT? Mike Fitzpatrick.
4. Object-Oriented Programming Procedural programming Structs and objects Object-oriented programming Concepts and terminology Related keywords.
Object Oriented Programming in Java. Object Oriented Programming Concepts in Java Object oriented Programming is a paradigm or organizing principle for.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
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.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
Object-oriented Programming Concepts
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Themes and Variations abstraction -- the object metaphor modeling -- understanding.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
C++ fundamentals.
CSC238 INTRODUCTION TO OOP Chapter 1.
OOP- OBJECT OBJECT PROGRAMMING By KRATI SHARMA 02 XI-B ✏✏✏✏ ☺☻☺☻☺☻☺ ✏✏✏✏
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 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.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Objects and Components. The adaptive organization The competitive environment of businesses continuously changing, and the pace of that change is increasing.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
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.
Design.ppt1 Top-down designs: 1. Define the Problem IPO 2. Identify tasks, Modularize 3. Use structure chart 4. Pseudocode for Mainline 5. Construct pseudocode.
 Programming Language  Object Oriented Programming  JAVA – An Introduction  JAVA Milestones  JAVA Features.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
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.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Object-Oriented Concepts Overview. Florida Community College at Jacksonville COP 2551 Object-Oriented Programming OO Concepts Overview Objective Overview.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Chapter 2 Principles of Programming and Software Engineering.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
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.
Concepts of Object Oriented Programming
JAVA By Waqas.
CHAPTER 5 GENERAL OOP CONCEPTS.
II – UNIT Procedure Oriented Programming
Object-Oriented Techniques
Object Oriented Concepts -I
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Lecture 1 Introduction.
Abstraction in Object-Oriented Programming
CIS601: Object-Oriented Programming in C++
Principles of object – oriented programming UNIT-1 Chapter-1.
UNIT I OBJECT ORIENTED PROGRAMMING FUNDAMENTALS
Introduction to Object-Oriented Programming
Object-Oriented Programming
Object Oriented Programming(OOP)
Presentation transcript:

Programming Paradigms(Model) Two Paradigms: – Procedural Programming Paradigm – Object Oriented Paradigm Objective of OO approach is to eliminate some of the flaws encountered in procedural approach. Flaws: Concentrated on logical organization of the code. Data (global) is allowed to move freely in the system. There is a chance of unintentional tampering of the data by the functions which access it. This data is not related to any one function (global data)

OOP Paradigm OOP treats data as critical element Does not allow to move freely in the system. It ties data closely to the function that operates on it. Protects it from unintentional tampering. Object=data+method Data Method

OOP Paradigm OOP allows us to decompose a problem into number of entities called “objects”. (Procedural paradigm decompose a problem into number of functions ) Then build data and functions (methods) around these entities. The combination of data and method make up OBJECT. The data of an object can be accessed only by the methods associated with that object. However methods of one object can access the methods of other objects.

Features of OOP Paradigm Emphasis is on data rather than procedure. Programs are divided into objects. Data structure characterize the objects. Methods that operate on the data of an object are tied together in the data structure(CAR example) Data is hidden and cannot be accessed by the external functions Objects may communicate with each other through methods.

Define: Object Oriented Programming Object Oriented Programming is an approach that provides a way of modularizing program by creating portioned memory area for both data and functions, that can be used as templates for creating copies of such modules on demand. Object oriented programming encourage you to decompose a problem into its constituent parts. Each component becomes a self-contained object that contains its own instructions and data that relate to that object. In this way, complexity is reduced and the programmer can manage larger program.

Object Oriented Programming Model Abstraction Encapsulation Inheritance Polymorphism

Abstraction It is essential element of object oriented programming. It is the act of representing essential features without including details. Human manages complexity through abstraction. Abstraction can be managed through hierarchical classification.

Hierarchical Classification CAR Car_EngineBreaking System Steering Audio System A/C Gear System FM CD Player

CAR_Engine Status:on/off Speed Start() Stop() Increase_speed() Decrease_speed() AudioSystem Status: on/off Volume (sound). Power. Start() Stop() Pause() Open_CD_Drive() Close_CD_Drive() Increase_Volume() Decrease_Volume() Start_FM() Stop_FM() select_Channel()

Encapsulation Encapsulation is the mechanism that binds together code and the data it manipulates. It keeps both safe from outside interference and misuse. It acts as a protective wrapper that prevents the code and data from being arbitrarily accessed by other code outside the wrapper. [Discuss by using procedural paradigm how car can be implemented and compare with OOP paradigm]

Encapsulation This same idea can be applied to programming. The power of encapsulated code is that everyone knows how to access it and thus can use it regardless of the implementation details- and without fear of unexpected side effects. In C++, the basis of encapsulation is CLASS. A class defines the structure and behavior (data and code) that will be shared by set of objects. Each object of a given class contains the structure and behavior defined by the class. Objects are referred as “instance of a class” The CLASS is a logical (blue print) construct and an OBJECT has physical reality.

Classes When we create a class, we specify the code (method) and data (variables). The methods and data are collectively called members of a class. We refer them as me “member variables or instance variables”. The code/method is referred as “member method or just a method”.