0% found this document useful (0 votes)
6 views18 pages

1-Introduction To OOP

Uploaded by

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

1-Introduction To OOP

Uploaded by

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

Introduction to Object-Oriented

Programming
Contents
• Brief history of computer programming
• Procedural programming
• Object-oriented programming

2
Computer Programming

• A computer program is a list of instructions


that tell computer what to do
• Example of a simple PASCAL program:

3
Programming Languages
Three main categories:
• Machine languages
• Low-level assembly languages
• High-level programming languages

4
Machine Languages
• Composed of 0 and 1
• Is the “native” language of a computer, but difficult to program
• Example of machine codes:

5
Assembly Languages
• Computer instructions are represented in
symbolic codes
• Needs to be translated into machine codes
before processing
• Example of assembly codes:

• Assembly language is a step towards easier


programming

6
High-level Languages
• Syntax is similar to human languages
• Need to be compiled into machine codes for
executing
• Example of high-level codes:

• High-level language is a big step towards easier


programming
7
Classifying high-level languages
• Historically, high-level languages are divided
into two categories:
• Procedural Programming
• Object-Oriented Programming (OOP)

8
Procedural Programming
• Procedural programming is a programming paradigm where
program contains a sequential sets of computational/linear
commands to be carried out by the computer

9
Procedural Programming
• In procedural programming, computer program is
divided into small parts called functions

10
Example of Procedural Programming

Six Sequential Computation Steps


11
Procedural Languages

12
Object-Oriented Programming
• OOP is a programming an object
paradigm where computer Data
program is divided into Method 1 Method 2 Method 3
parts called objects
• Key idea:
“The real world can be
Method 1 Method 2 Method 3
described as a collection of
objects that interact” Data

another object

13
Object-Oriented Programming
• In OOP, object is a “thing” that includes both
data (properties) and functions (methods)

14
OOP Languages
• In OOP languages, programmers create programs
using “blueprints” of data models called classes

15
Example of OOP Languages

16
Example of OOP Languages

• Java will be used as the language to


demonstrate OOP concepts in this course

17
18

You might also like