1.4. Object-oriented programming
1.4. Object-oriented programming
OF
COMPUTATIONAL
THINKING AND PROGRAMMING
Object-oriented programming
Revision
• How do you perform multi-lines comments in
Java?
• What is semantic error?
• What keyword do you use in Python to define a
function?
Class, Object and Scope
Learning Objectives
This session will cover:
1. An overview of programming paradigms;
2. Procedural vs Object Oriented Programming;
3. Class;
4. Object.
Overview
Procedural
Declarative
Programming Functional
Paradigms
Object
Oriented
Overview
Different programming languages allow and encourage the use of
different programming models.
Object:
Audi
Object:
Object:
Aston
Bugatti
Martin
Class:
Object: Car Object:
Ferrari BMW
Object:
Object:
Range
Jeep
Rover
Classes and Objects
Object:
Desk
Object: Object:
Sofa Chair
Class:
Furniture
Object: Object:
Bed Stool
Object: Object:
Bench Cabinet
OOP - Inheritance