What is a Programming Paradigm

Similar documents
CHAPTER 5 GENERAL OOP CONCEPTS

OBJECT ORIENTED PROGRAMMING

Elementary Concepts of Object Class

1. Write two major differences between Object-oriented programming and procedural programming?

BASIC CONCEPT OF OOP

Object-Oriented Programming in C++/Handout 01 Page 1 of 8

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer


Object oriented programming Concepts

Programmazione. Prof. Marco Bertini

Overview. OOP: model, map, reuse, extend. Examples of objects. Introduction to Object Oriented Design

ENCAPSULATION. private, public, scope and visibility rules. packages and package level access.

Chapter 5 Object-Oriented Programming

Objects First with Java A Practical Introduction using BlueJ

Introduction to Object-Oriented Programming

Object Oriented Programming using C++

Introduction to OOP. Procedural Programming sequence of statements to solve a problem.

Object Oriented Programming. C++ 6 th Sem, A Div Ms. Mouna M. Naravani

Software Engineering

Classes and Objects. Object Orientated Analysis and Design. Benjamin Kenwright

Part 7 - Object Oriented Concepts Classes, Objects, Properties and Methods

Objects First with Java A Practical Introduction using BlueJ


Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

CHAPTER 9 DESIGN ENGINEERING. Overview

Object-Oriented Programming Concepts

A201 Object Oriented Programming with Visual Basic.Net

Object Oriented Technology

CGS 2405 Advanced Programming with C++ Course Justification

2D1358 Object Oriented Program Construction in C++ Exercises & Labs. Course Registration / Accounts. Course Literature

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis

Downloaded from

Computer Science 4U Unit 1. Programming Concepts and Skills Modular Design

Master of Computer Applications

Object-Oriented Design II

Sri Vidya College of Engineering & Technology

Advantages of Object Oriented Programming :- Features of Object Oriented Programming :- Advantages Of Object Oriented Programming :

Chapter 8: Creating Your Own Type Classes

A Hierarchical Model for Object- Oriented Design Quality Assessment

Inheritance, and Polymorphism.

Expanding Our Horizons. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 9 09/25/2011

An OBJECT contains VARIABLES = PROPERTIES and METHODS = BEHAVIORS. Outline the general nature of an object.

Unit 1 : Principles of object oriented programming

Inheritance and Polymorphism

The Analysis and Design of the Object-oriented System Li Xin 1, a

PROGRAMMING IN C++ COURSE CONTENT

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation

Inheritance. OOP components. Another Example. Is a Vs Has a. Virtual Destructor rule. Virtual Functions 4/13/2017

A STUDY OF OBJECT ORIENTED ANALYSIS AND DESIGN

CHAPTER 1 Fundamentals of Distributed System. Issues in designing Distributed System

Object Oriented Programming

CSC207H: Software Design SOLID. CSC207 Winter 2018

Patterns and Testing

Introduction. Object Orientated Analysis and Design. Benjamin Kenwright

Chapter3: Introduction to Classes and Objects

From Module To Objects

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation

Object- Oriented Design with UML and Java Part I: Fundamentals

Chapter 1: Programming Principles

CompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards

The University Of Michigan. EECS402 Lecture 06. Andrew M. Morgan. Savitch Ch. 6 Intro To OOP Classes Objects ADTs.

Solved Question Paper June 2017

Programming II. Modularity 2017/18

THE OBJECT-ORIENTED DESIGN PROCESS AND DESIGN AXIOMS (CH -9)

What are the characteristics of Object Oriented programming language?

OO Techniques & UML Class Diagrams

In this Lecture you will Learn: Design Patterns. Patterns vs. Frameworks. Patterns vs. Frameworks

Object-oriented programming. and data-structures CS/ENGRD 2110 SUMMER 2018

OOPs: The Harsh Realities of Programming

SOFTWARE ENGINEERING. Lecture 6. By: Latifa ALrashed. Networks and Communication Department

The major elements of the object-oriented model

Topic : Object Oriented Design Principles

Object oriented Programming

Introduction to Object Oriented Analysis and Design

Programming, numerics and optimization

Lecture 1. Abstraction

Domain Driven Design IS. An architectural methodology for evolving a software system that closely aligns to business requirements

Introduction... ix. Chapter 1: Exploring Fundamental Programming Concepts... 1

Lecture 7: Classes and Objects CS2301

ICT Object Oriented Design Standards

Fundamental Concepts (Principles) of Object Oriented Programming These slides are based on:

Chapter 1: Principles of Programming and Software Engineering

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

The object-oriented approach goes a step further by providing tools for the programmer to represent elements in the problem space.

/99/$ IEEE

Module 10 Inheritance, Virtual Functions, and Polymorphism

INTRODUCTION TO Object Oriented Systems BHUSHAN JADHAV

Abstraction. Abstraction

Chapter 13. Object Oriented Programming

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

EL2310 Scientific Programming

ICS 52: Introduction to Software Engineering

ICS 52: Introduction to Software Engineering

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

Chapter 12 Object-Oriented Programming. Starting Out with Games & Graphics in C++ Tony Gaddis

Agile Model-Driven Development with UML 2.0 SCOTT W. AM BLER. Foreword by Randy Miller UNIFIED 1420 MODELING LANGUAGE. gile 1.

Chapter 12. Systems Design. McGraw-Hill/Irwin. Copyright 2007 by The McGraw-Hill Companies, Inc. All rights reserved.

System Design and Modular Programming

Object-Oriented Programming (OOP) Fundamental Principles of OOP

CSE 70 Final Exam Fall 2009

Transcription:

INTRODUCTION This chapter begins with brief discussion of various Programming paradigms that C++ supports i.e., procedural programming style, object based programming style and object oriented programming style. This is followed by detailed discussion of object oriented programming and its implementation. All this shall help you appreciate OOP style and its advantages over other programming methodologies. 1

What is a Programming Paradigm A Programming Paradigm defines the methodology of designing and implementing programs using the key features and building blocks of a programming language.

Procedural Programming Procedural programming paradigm separates the functions and the data manipulated by them. This leads to many problems when it comes to extending the software or maintaining the software. Procedural Programming is susceptible to design changes. Procedural Programming leads to increase time and cost overheads during design changes.

Object Based Programming Object based programming is a newer paradigm that implements some features of object oriented programming but not all. In object based programming, data and its associated meaningful functions are enclosed in one single entity a class. Classes enforce information hiding and abstraction thereby separating the implementation details and the uses interface. 4

[For instance, you can consider a calculator, its interface would include a small display screen and a few buttons that is available to the user and implementation details i.e. how actual calculations are taking place are hidden from user.] 5

Object based programming localizes the implementation details. Object based programming is subject of Object Oriented programming.

Advantages of Object Based Programming i. It overcomes most shortcomings of procedural programming, ii. It localizes changes and hides implementation details from user, iii. It supports user-defined types, iv. Implements information hiding and abstraction etc.

Limitations However, object based programming suffers from a major limitation and that is its inability to represent real world relationships that exist among object. For example, both car and truck are vehicles. This can not be represented in object based programming as it does not support inheritance.

Object Oriented Programming The object oriented programming paradigm is superset of object based programming. It offers all the features of object based programming and overcomes its limitation by implementing inheritance.

What is an OBJECT? Object is an identifiable entity with some characteristics and behaviour. What is a CLASS? A class is a group of objects that share common properties and relationships.

Function 1 Data 1 Object 1 Object 2 Function 2 Properties Behaviour Properties Behaviour Data 2 Function 3 All data is openly available to all functions in the program Data and functions enclosed within objects. New objects communicate with one another.

BASIC CONCEPTS OF OOP These general concepts of OOP are given below: Data Abstraction Data Encapsulation Modularity Inheritance Polymorphism

Data Abstraction Abstraction refers to the act of representing essential features without including the background details or explanations.

What is encapsulation? The wrapping up of data and operations / functions (that operate on the data) into a single unit (called class) is known as Encapsulation.

Data Member Functions Object Data Member Functions Data Member Functions Object Object

Modularity The act of partitioning a program into individual components is called modularity. The justification for partitioning a program is that it reduces its complexity to some degree and it creates a number of well-defined, documented boundaries within the program

What is a Modularity? Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.

Inheritance Inheritance is the capability of one class of things to inherit capabilities or properties from another class.

Vehicles Automobiles (Motor driven) Pulled Vehicles Car Bus Cart Rickshaw Property Inheritance

Polymorphism Polymorphism is the ability for a message or data to be processed in more than one form.

Shape Area Circle Area (circle) Triangle Area (triangle) Rectangle Area (rectangle) Polymorphism

ADVANTAGES of OOP 1. Re-use of code. 2. Ease of comprehension. 3. Ease of fabrication and maintenance. 4. Easy redesign and extension.

DISADVANTAGES of OOP a) With OOP, classes tend be overly generalized. b) The relations among classes become artificial at times. c) The OOP programs design is tricky. d) Also one need to do proper planning and proper design for OOP programming. e) To program with OOP, programmer need proper skills such as design skills, programming skills, thinking in terms of objects etc. 23