Oop - Transperencies Ch 01

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Oop - Transperencies Ch 01 as PDF for free.

More details

  • Words: 656
  • Pages: 14
Chapter 01 Concept of Object Oriented Programming

Programming Languages Language

Year

FORTRAN

1954-57

ALGOL 60

1958-60

COBOL

1959-60

APL

1956-60

LISP

1956-62

SNOBOL PL/I SIMULA 67 ALGOL 68 BLISS PASCAL C

1974

MESA

1974

Originator Purpose J. Backus (IBM) Committee

Numerical Numerical

Committee

Business Data Processing

K. Iverson

Array Processing

1962-66

J. McCarthy R. Griswold

String processing

1963-64

IBM

General

1967

O. J. Dahl

General

1963-68

Committee

General

1971

Wulf et. al.

System Programming

1971

N .Wirth

General and Education

CONCURRENT 1975

Dennis Ritchie Xerox PARC P. Brinch B. Liskov

Symbolic Computation

System Programming System Programming Concurrent Programming Abstraction Methodology Verifiable System Programs Verifiable System Programs

CLU

1974-77

EUCLID

1977

GYPSY

1977

PLZ MODULA ADA

1977

Zilog inc.

System Programming

1977

N. Wirth

System Programming

1979

J. Ichbiah

General – Embedded

C++

1983

Object Oriented Programming

JAVA

1991

B. Stroustrup J. Gosling

Committee Good et. al.

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

OOP + Embedded + N/W -1-

Chapter 01 Concept of Object Oriented Programming

Computer Languages

Imperative

Declarative

Procedural e.g. C

Logical e.g. PROLOG

Object Based e.g. ADA

Functional e.g. LISP

Object Oriented e.g. C++, JAVA

Database e.g. SQL

Block Structured e.g. PASCAL

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-2-

Chapter 01 Concept of Object Oriented Programming

C

C++

C#

Java

Programming Languages Hierarchy

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-3-

Chapter 01 Concept of Object Oriented Programming

0, 1 Machine language Assembly level Programming Procedure Oriented Programming Object Oriented Programming

Levels of Computer Software

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-4-

Chapter 01 Concept of Object Oriented Programming

Procedure Oriented Programs

Main Program

Function – 1

Function – 2

Function – 4

Function – 6

Function – 3

Function – 5

Function – 7

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

Function – 8

-5-

Chapter 01 Concept of Object Oriented Programming

Relationship of data and functions in Procedure Oriented Programming

Global Data

Global Data

Function – 1

Function – 2

Function – 3

Local Data

Local Data

Local Data

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-6-

Chapter 01 Concept of Object Oriented Programming

Object A

Object B

Data

Data

Functions

Functions

Communication

Data Functions

Object C Organization of data and functions in OOP

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-7-

Chapter 01 Concept of Object Oriented Programming

Object: Student Data Name Date-of-birth Marks Functions Total Average Display ------

Student Total Average Display

Ways of representing the object

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-8-

Chapter 01 Concept of Object Oriented Programming

Bird Attributes • Feathers • Lay eggs

Flying Bird Attributes ---------------

Non-Flying Bird Attributes ---------------

Pigeon

Parrot

Penguin

Peacock

Attributes ---------------

Attributes ---------------

Attributes ---------------

Attributes ---------------

Property Inheritance

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

-9-

Chapter 01 Concept of Object Oriented Programming

Shape Draw( )

Circle obj.

Box obj.

Cone obj.

Draw(cir)

Draw(box)

Draw(cone)

Polymorphism

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

- 10 -

Chapter 01 Concept of Object Oriented Programming

Chars.

Simula

SmallTalk

C++

Eiffel

Java

Binding

Both

Late

Both Early

Both

















Poly morphism Data Hiding √



Inheritance Multiple Inheritance Garbage Collection Generacity Object Libraries

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

- 11 -

Chapter 01 Concept of Object Oriented Programming

Screen

cout

<<

Object

Insertion Operator

x Variable

Output using insertion operator

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

- 12 -

Chapter 01 Concept of Object Oriented Programming

Object

cin

Extraction Operator

x

>>

12

Keyboard Input using extraction operator

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

- 13 -

Chapter 01 Concept of Object Oriented Programming

Include files Class declarations Member function declarations Main function program

Structure of C++ program

Object Oriented Programming (SYIF) 2008-2009 by Kute T. B.

- 14 -

Related Documents