Programming paradigms

Slides:



Advertisements
Similar presentations
Object Oriented Programming
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Problem Solving and Algorithm Design
Programming Paradigms and languages
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
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.
Jigar Gaglani.  A Programming language is a notational system for describing computations in a machine and human readable form.
Object Oriented Programming A brief review of what you should know about OOP.
Object-oriented Programming Concepts
Chapter 1 Principles of Programming and Software Engineering.
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.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Introduction to Object-oriented Programming Introduction to Object-oriented Programming CMPS 2143.
BACS 287 Basics of Object-Oriented Programming 1.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Object Oriented Programming
OOP- OBJECT OBJECT PROGRAMMING By KRATI SHARMA 02 XI-B ✏✏✏✏ ☺☻☺☻☺☻☺ ✏✏✏✏
Object Oriented Programming Development
Introduction to Object-oriented programming and software development Lecture 1.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
Jigar Gaglani.  Programming paradigm is a fundamental style of computer programming  Paradigms differ in concepts and abstractions used to represent.
Learners Support Publications Object Oriented Programming.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
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”
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
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.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
By : Robert Apeldorn. What is OOP?  Object-oriented programming is a programming paradigm that uses “objects” to design applications and computer programs.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Software Design and Development Languages and Environments Computing Science.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
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.
Principles of Programming & Software Engineering
Object-Oriented Programming
OOP - Object Oriented Programming
Object-Orientated Programming
Visit for more Learning Resources
Object Oriented Programming
Tips on coding practices
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Sachin Malhotra Saurabh Choudhary
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
JAVA By Waqas.
Why study programming languages?
University of Central Florida COP 3330 Object Oriented Programming
CHAPTER 5 GENERAL OOP CONCEPTS.
Object-Oriented Analysis and Design
Programming in Java Sachin Malhotra, Chairperson, PGDM-IT, IMS Ghaziabad Saurabh Chaudhary, Dean, Academics, IMS Ghaziabad.
Principles of Programming and Software Engineering
CS101 Introduction to Computing Lecture 19 Programming Languages
University of Central Florida COP 3330 Object Oriented Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Computer Programming.
PROGRAMMING PARADIGMS
CIS601: Object-Oriented Programming in C++
Principles of Programming Languages
Overview of Programming Paradigms
Presentation transcript:

Programming paradigms Lecture I Programming paradigms

Programming styles Unstructured: - This style of programming helps us to write small and simple programs. In this programming no separate procedure were written for repetitive task. Generally we avoid such type of programming. Structured:- This style of programming helps us to broken down a large program onto small independent tasks that are easy to understand without having to understand the whole program. These tasks are developed independently, without the help of other tasks. Object-oriented Programming: - ??

What is a paradigm Programming paradigm refers to how a program is written in order to solve a problem.

Different Paradigms Imperative paradigm Functional paradigm Logic paradigm Object-Oriented paradigm

Imperative Paradigm First do this and next do that Characteristics: Straightforward abstractions of the way a traditional Von Neumann computer works Execution of computational steps in an order governed by control structures Similar to descriptions of everyday routines, such as food recipes and car repair Typical commands offered by imperative languages Assignment, IO, procedure calls Language representatives Fortran, Algol, Pascal, Basic, C "Procedural programming"

Functional Paradigm Evaluate an expression and use the resulting value for something Characteristics: Discipline and idea Mathematics and the theory of functions Atemporal Time only plays a minor role compared to the imperative paradigm Applicative All computations are done by applying (calling) functions The natural abstraction is the function Fits well with computations driven by needs

Logic Paradigm Answer a question via search for a solution Characteristics: Discipline and idea Automatic proofs within artificial intelligence Based on axioms, inference rules, and queries. Program execution becomes a systematic search in a set of facts, making use of a set of inference rules

Object-Oriented Paradigm Send messages between objects to simulate the temporal evolution of a set of real world phenomena Characteristics: Data as well as operations are encapsulated in objects Information hiding is used to protect internal properties of an object Objects interact by means of message passing In most object-oriented languages objects are grouped in classes Classes are organized in inheritance hierarchies

OOP Programmers define not only the data type of a data structure, but also the types of operations that can be applied to the data structure. Data structure becomes an object that includes both data and functions. Enable programmers to create modules that do not need to be changed when a new type of object is added.

Features of OOP Encapsulation Data abstraction Inheritance Polymorphism Message passing Extensibility Genericity

OO Concepts Object Encapsulation Class Inheritance Interface Package

Object models the real-world objects that you find in everyday life. A software object.

A bicycle modeled as a software object. Object example Consider a bicycle, for example: A bicycle modeled as a software object.

Encapsulation Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation.

Benefits Modularity: The source code for an object can be written and maintained independently of the source code for other objects. Information-hiding: By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world. Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program. Pluggability and debugging ease: If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement.

Class A class is a blueprint or prototype from which objects are created.

A hierarchy of bicycle classes. Inheritance A mechanism for organizing and structuring your software. A hierarchy of bicycle classes.