Professional Documents
Culture Documents
Object-Oriented Programming Research
Object-Oriented Programming Research
LẬP TRÌNH
HƯỚNG ĐỐI
TƯỢNG
Người thực hiện : Phùng Thị Thu An
Nội dung bài giảng
KNOW USE
Nhược điểm:
• Xây dựng chương trình dựa trên các hàm / thủ tục / Khi thay đổi dữ
liệu thì giải
chương trình con thuật chương
trình cũng phải
• Dữ liệu và xử lý (hàm) tách rời nhau thay đổi.
• Các hàm có thể tuân theo một cách thức chung truy cập
vào dữ liệu.
Ưu điểm:
• NNLT: Pascal, C, C ++,… • Chương trình dễ hiểu, dễ theo dõi.
• Tư duy giải thuật rõ ràng.
OOP là gì ? Lập trình hướng đối tượng
Tên Ngủ
Con mèo Màu sắc Ăn
Giống mèo… Bắt chuột…
• Thuộc tính:
Khi nhiều đối tượng có những đặc tính như nhau sẽ ID: 19000241
Balance: 300000
được gom lại thành một lớp đối tượng (class) và
Phương thức: deposit()
cũng sẽ có 2 thành phần là thuộc tính và phương withdraw()
checkBalance()
thức.
• cũng có thể được dùng để định nghĩa một kiểu dữ
Thuộc tính: ID: 19000258
liệu mới. Balance: 700000
Class BankAccount
Phương thức:
Thuộc tính: ID, Balance deposit()
withdraw()
checkBalance()
Phương thức: deposit(),
withdraw(),checkBalance()
02
Các nguyên lý
Các nguyên lý OOP
!
01 Encapsulation 02 Inheritance
Tính đóng gói Tính kế thừa
04 Polymorphism 03 Abstraction
Tính đa hình Tính trừu tượng
1. Encapsulation
• Che giấu, ẩn đi chi tiết thực hiện bên
trong. 123456
phương thức.
• Các lớp con không phải định nghĩa lại, ngoài ra
có thể mở rộng các thành phần kế thừa và bổ
sung thêm các thành phần mới.
https://
quantrimang.com/lap-trinh-huong-doi-
tuong-trong-python-160230
https://users.soict.hust.edu.vn/trungtt/
uploads/slides/OOP_Bai01(vi).
pdf
Thanks!
Do you have any questions?
Vectors:
● Flat style science lab
● Scientists in lab vaccine concept
● Science lab objects pack
● Researcher holding dna molecules
● Flat design science lab
● Modern cctv sign collection with flat design
Photos:
● Foreground of businessman with loupe
● Copy-space doctor equipment
Instructions for use
In order to use this template, you must credit Slidesgo by keeping the Thanks slide.
For more information about editing slides, please read our FAQs or visit Slidesgo School:
https://slidesgo.com/faqs and https://slidesgo.com/slidesgo-school
Instructions for use (premium users)
As a Premium user, you can use this template without attributing Slidesgo or keeping the "Thanks" slide.
For more information about editing slides, please read our FAQs or visit Slidesgo School:
https://slidesgo.com/faqs and https://slidesgo.com/slidesgo-school
Fonts & colors used
Aldrich
(https://fonts.google.com/specimen/Aldrich)
Commissioner
(https://fonts.google.com/specimen/Commissioner)
#5cc0f1 #e57a32
Storyset
Create your Story with our illustrated concepts. Choose the style you like the most, edit its colors, pick
the background and layers you want to show and bring them to life with the animator panel! It will boost
your presentation. Check out How it works.
You can easily resize these resources without losing quality. To change the color, just ungroup the resource
and click on the object you want to change. Then, click on the paint bucket and select the color you want.
Group the resource again when you’re done. You can also look for more infographics on Slidesgo.
JANUARY FEBRUARY MARCH APRIL MAY JUNE
PHASE 1
Task 1
Task 2
PHASE 2
Task 1
Task 2
PHASE
1
Task 1
Task 2
...and our sets of editable icons