0% found this document useful (0 votes)
2 views

Lesson-9.-Object-Oriented-Programming

Object oriented programming

Uploaded by

Cherrylyn Ramos
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lesson-9.-Object-Oriented-Programming

Object oriented programming

Uploaded by

Cherrylyn Ramos
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Lesson 8-9: OOP

OOP CONCEPTS IN
PHYTHON
Topics
1.Intro to OOP Concepts
2.Classes
3.Objects
4.Constructors
5.Init Function
6.Object with Constructors
Learning Outcomes
 Understanding OOP in Pyhthon
 Understanding Classes and
Objects
 Creating Classes
 Creating Objects
 Accessing attributes
 Understanding Constructors
 Understanding init Functions
 Creating Objects with
Constructors
What is OOP Concept?
What is Object?
What is Class?
Creating Object
Actual Program in Pycharm
Accessing the Attributes
Actual Program in Pycharm
Activity # 1
Create a program of
classes and objects with 5
attributes with the
following real objects..
PRODUCTS
CARS
ANIMALS
What is Constructors?

Note: The use of constructors is to make


our codes clean and will not consume a
lot of time in repeating the variables.
What is Initialized(_init_) function?

Note: The use init function is to make


your program more organized.
What is Initialized(_init_) function?

Note: Create a another python file or


window to type in this code. Just click file
menu and choose new in the pop up
menu then choose Python File.
Example
What is Self Paramater?
Object with Constructor
Object with Constructor

Note: You should follow


the order of the
variables
Example1
Example2
Example3
Activity # 2

Create constructors and


modify the program you
have created in your
Activity #1 about classes
and objects with 5
attributes.

You might also like