0% found this document useful (0 votes)
41 views20 pages

Shift from Object-Oriented Programming

The document provides an introduction to object-oriented programming (OOP). It discusses the history of programming languages moving from machine languages to modern high-level languages like Java and C++ that support OOP. Simula was the first OOP language. OOP uses classes and objects to model real-world things, grouping data and functions together. Key ideas are that programs can describe the world as collections of interacting objects, and that objects contain both data (properties) and behaviors (methods).

Uploaded by

dada
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)
41 views20 pages

Shift from Object-Oriented Programming

The document provides an introduction to object-oriented programming (OOP). It discusses the history of programming languages moving from machine languages to modern high-level languages like Java and C++ that support OOP. Simula was the first OOP language. OOP uses classes and objects to model real-world things, grouping data and functions together. Key ideas are that programs can describe the world as collections of interacting objects, and that objects contain both data (properties) and behaviors (methods).

Uploaded by

dada
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/ 20

Introduction to Object Oriented Programming

JadeC#

“The World is Object-Oriented”


-Alan Kay

1
Introduction
– A Brief Programming History
– OOP

2
Computer Programming
An algorithm is a step-by-step process.

A computer program is a step-by-step set of


instructions for a computer.

Every computer program is an algorithm.

3
Computer Programming
The history of computer programming is a
steady move away from machine-oriented
views of programming towards concepts and
metaphors that more closely reflect the way
in which we ourselves see & understand the
world

4
Programming Languages
• Programming languages allow programmers
to develop software.
• The three major families of languages are:
– Machine languages
– Assembly languages
– High-Level languages

5
Machine Languages
• Comprised of 1s and 0s
• The “native” language of a computer
• Difficult to program – one misplaced 1 or 0
will cause the program to fail.
• Example of code:
1110100010101 111010101110
10111010110100 10100011110111

6
Assembly Languages
• Assembly languages are a step towards easier
programming.
• Assembly languages are comprised of a set of
elemental commands which are tied to a
specific processor.
• Assembly language code needs to be translated
to machine language before the computer
processes it.
• Example:
ADD 1001010, 1011010

7
High-Level Languages
• High-level languages represent a giant leap
towards easier programming.
• The syntax of HL languages is similar to English.
• Example:
grossPay = basePay + overTimePay
• Interpreter – Executes high level language programs without compilation.

• Historically, we divide HL languages into two


groups:
– Procedural languages
– Object-Oriented languages (OOP)
8
Procedural Languages
• Early high-level languages are typically called
procedural languages.
• Procedural languages are characterized by
sequential sets of linear commands. The focus
of such languages is on structure.
• Examples include C, COBOL, Fortran, LISP,
Perl, VBScript

9
Object-Oriented Languages
• The focus of OOP languages is not on structure,
but on modeling data.
• Programmers code using “blueprints” of data
models called classes.
• Examples of OOP languages include C++,
Visual Basic.NET and Java.

10
Early programming languages
1950s 1960s 1970s
Simula
Lisp
Algol60 Algol68

Fortran Pascal

BCPL Classic C
COBOL

PL\1

Red==major commercial use


12
Blue==will produce important “offspring”
Modern programming languages
Lisp Python
Smalltalk PHP
Fortran77
Eiffel Java95 Java04
Simula67

C89 C++ C++98 C++0x

Ada Ada98 C#

Pascal Object Pascal


COBOL04 Javascript
COBOL89
Visual Basic
PERL 13
• Simula is a name for two simulation programming
languages, Simula I and Simula 67, developed in the
1960s at the Norwegian Computing Center in Oslo, by
Ole-Johan Dahl and Kristen Nygaard.
• Simula is considered the first object-oriented
programming language.
• Simula was designed for doing simulations, and the
needs of that domain provided the framework for many of
the features of object-oriented languages today.

13
 Introduction
– A Brief Programming History
– OOP
– Classes & Objects

14
OOP
• OOP is mainly a program design philosophy.
• OOP uses a different set of programming
languages than old procedural programming
languages (C, Pascal, etc.).
• Everything in OOP is grouped as self
sustainable "objects". Hence, you gain re-
usability by means of four main object-oriented
programming concepts.

15
OOP
• In OOP programmers define not only the data type of a data
structure, but also the types of operations/methods
(functions) that can be applied to the data structure.

• In this way, the data structure becomes an object that


includes both data and functions (methods) in one unit. In
addition, programmers can create relationships between
one object and another.

• For example, objects can inherit characteristics from other


objects.
16
Object-Oriented Programming Languages

· Pure OO Languages
Eiffel, Actor, Emerald, JADE, Obix, Ruby, Python, Scala,
Smalltalk, Self.

· Hybrid OO Languages
Delphi/Object Pascal, C++, Java, C#, VB.NET, Pascal,
Visual Basic, MATLAB, Fortran, Perl, COBOL 2002,
PHP, ABAP, Ada 95.

17
OOP
Key idea in object-oriented:

The real world can be “accurately” described as a


collection of objects that interact.

18
OOP Basic Terminology
Object
- usually a person, place or thing (a noun)
Method
- an action performed by an object (a verb)
Property or attribute
- Characteristics of certain object.
Class
- a category of similar objects (such as automobiles), does
not hold any values of the object’s attributes/properties

19
Thank you

You might also like