0% found this document useful (0 votes)
33 views13 pages

Object Oriented Programming: Steve Clar

Object-oriented programming (OOP) groups data and functions that operate on that data into objects. OOP aims to model the real world by representing concrete things like vehicles or countries as objects that encapsulate both data and behavior. Key characteristics of OOP include objects, classes which define types of objects, and inheritance which allows the creation of new classes as extensions of existing classes for code reuse. The document introduces OOP concepts and contrasts it with procedural programming, noting OOP's advantages in modeling complex real-world relationships and enabling reuse through inheritance.

Uploaded by

Steve Clar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views13 pages

Object Oriented Programming: Steve Clar

Object-oriented programming (OOP) groups data and functions that operate on that data into objects. OOP aims to model the real world by representing concrete things like vehicles or countries as objects that encapsulate both data and behavior. Key characteristics of OOP include objects, classes which define types of objects, and inheritance which allows the creation of new classes as extensions of existing classes for code reuse. The document introduces OOP concepts and contrasts it with procedural programming, noting OOP's advantages in modeling complex real-world relationships and enabling reuse through inheritance.

Uploaded by

Steve Clar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

OBJECT ORIENTED

PROGRAMMING
Steve Clar
CHAPTER 1
THE BIG PICTURE
• PROCEDURAL VERSUS OBJECT-ORIENTED LANGUAGES
• FEATURES OF OBJECT-ORIENTED LANGUAGES
• INTRODUCTION TO CLASSES AND OBJECTS
• INTRODUCTION TO INHERITANCE
• C++ AND C
WHY DO WE NEED
OBJECT-ORIENTED
PROGRAMMI
NG?
PROCEDURAL LANGUAGES
 Pascal, C, BASIC, Fortran, and similar languages are procedural languages.

 A program in a procedural language is a list of instructions


DIVISION INTO FUNCTIONS
 The idea of breaking a program into functions can be further extended by grouping a number

of functions together into larger entity called a module.

 Dividing a program into functions and modules is one of the cornerstone of structured
programming , the somewhat loosely defined discipline that has influenced programming
organization for more than a decade.
PROBLEMS WITH STRUCTURED
PROGRAMMING
 As programs grow ever larger and more complex, even the structured programming

approach begin to show sign of strain.

WHAT ARE THE REASONS FOR THESE


FAILURE OF PROCEDURAL LANGUAGES?
 Data Undervalued

 Relationship to the real world

 New Data Types


THE OBJECT-ORIENTED
APPROACH
 Combine into a single unit both data and the functions that operate on that data. Such a unit is

called object.

 An object’s functions, called member functions in C++, typically provide the only way to

access its data.

 Data Encapsulation and Data Hiding are the key terms in the description of object-oriented

languages.
OOP: AN APPROACH TO
ORGANIZATION
 Object-oriented programming is not primarily concerned with the details of program
operation. Instead, it deals with the overall organization of the program
CHARACTERISTICS OF
OBJECT-ORIENTED
PROGRAMMING
• OBJECTS
• CLASSES
• INHERITANCE
• REUSABILITY
OBJECT
 Programming Constructs
 Customized Array

 Stack

 Linked List

 Binary Trees

 Physical Objects

 Automobiles in a traffic-flow simulation

 Electrical components in a circuit-design program

 Countries in an economic model

 Aircraft in an air-traffic-control system


CLASSES
 Objects are member of classes.

INHERITANCE
 Analogous to using functions to simplify a traditional procedural program.
C++ AND C
 C++ is derived from the C language.
SUMMARY
 OOP is a way of organizing programs.

You might also like