SlideShare a Scribd company logo
1 of 7
Download to read offline
Universitas Teknokrat Indonesia
OBJECT ORIENTED PROGRAMMING
Chapter 6
- ENCAPSULATION -
Yuri Rahmanto, S.Kom., M.Kom.
Universitas Teknokrat Indonesia
Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu,
Kedaton, Bandar Lampung, Lampung 35132
Objectives Theory Conclusion Assignment
ENCAPSULATION
o Encapsulation is the technique of making the
fields in a class private and providing access
to the fields via public methods
(INFORMATION HIDING & INTERFACE TO
ACCESS DATA)
o Encapsulation also can be described as a
protective barrier that prevents the code
and data being randomly accessed by other
code defined outside the class.
Universitas Teknokrat Indonesia
Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu,
Kedaton, Bandar Lampung, Lampung 35132
Objectives Theory Conclusion Assignment
MODIFIER/VISIBILITY
Modifier Class Package Sub Class All Class
Private Y
Default Y Y
Protected Y Y Y
Public Y Y Y Y
Universitas Teknokrat Indonesia
Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu,
Kedaton, Bandar Lampung, Lampung 35132
Objectives Theory Conclusion Assignment
Conclusion
o Hiding the details of how
the object works: The only
part of the object that is
accessible to the outside
world is its behaviors.
What happens inside those
behaviors and how the
state is stored is hidden
from view.
Universitas Teknokrat Indonesia
Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu,
Kedaton, Bandar Lampung, Lampung 35132
Objectives Theory Conclusion Assignment
Assignment 1
Menampilkan data mahasiswa
dari NPM dan Nama yang
diinputkan (gunakan Scanner)
Universitas Teknokrat Indonesia
Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu,
Kedaton, Bandar Lampung, Lampung 35132
Objectives Theory Conclusion Assignment
Assignment 2
Lengkapi atribut (beserta
method set n get) berupa
alamat, no hp, email, Instagram
Universitas Teknokrat Indonesia
Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu,
Kedaton, Bandar Lampung, Lampung 35132

More Related Content

More from rahmantoyuri

new Chapter 4 - Form Transaksi.pdf
new Chapter 4 - Form Transaksi.pdfnew Chapter 4 - Form Transaksi.pdf
new Chapter 4 - Form Transaksi.pdfrahmantoyuri
 
new Chapter 3 - Form Master.pdf
new Chapter 3 - Form Master.pdfnew Chapter 3 - Form Master.pdf
new Chapter 3 - Form Master.pdfrahmantoyuri
 
new Chapter 2 - New Project Visual Studio C#.pdf
new Chapter 2 - New Project Visual Studio C#.pdfnew Chapter 2 - New Project Visual Studio C#.pdf
new Chapter 2 - New Project Visual Studio C#.pdfrahmantoyuri
 
new Chapter 1 - Membuat Database.pdf
new Chapter 1 - Membuat Database.pdfnew Chapter 1 - Membuat Database.pdf
new Chapter 1 - Membuat Database.pdfrahmantoyuri
 
Slide Ngajar E-Filing cover.pdf
Slide Ngajar E-Filing cover.pdfSlide Ngajar E-Filing cover.pdf
Slide Ngajar E-Filing cover.pdfrahmantoyuri
 
ELECTRONIC FILING (E-FILING).pdf
ELECTRONIC FILING (E-FILING).pdfELECTRONIC FILING (E-FILING).pdf
ELECTRONIC FILING (E-FILING).pdfrahmantoyuri
 
Materi Kearsipan Manual.pdf
Materi Kearsipan Manual.pdfMateri Kearsipan Manual.pdf
Materi Kearsipan Manual.pdfrahmantoyuri
 
Fungsi Agregat.pptx
Fungsi Agregat.pptxFungsi Agregat.pptx
Fungsi Agregat.pptxrahmantoyuri
 
Data Manipulation language (DML).pptx
Data Manipulation language (DML).pptxData Manipulation language (DML).pptx
Data Manipulation language (DML).pptxrahmantoyuri
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptxrahmantoyuri
 
Data Definition Language.pptx
Data Definition Language.pptxData Definition Language.pptx
Data Definition Language.pptxrahmantoyuri
 
Data, Tabel dan Pengantar SQL.pptx
Data, Tabel dan Pengantar SQL.pptxData, Tabel dan Pengantar SQL.pptx
Data, Tabel dan Pengantar SQL.pptxrahmantoyuri
 
Key and Relationship Mapping.pptx
Key and Relationship Mapping.pptxKey and Relationship Mapping.pptx
Key and Relationship Mapping.pptxrahmantoyuri
 

More from rahmantoyuri (20)

new Chapter 4 - Form Transaksi.pdf
new Chapter 4 - Form Transaksi.pdfnew Chapter 4 - Form Transaksi.pdf
new Chapter 4 - Form Transaksi.pdf
 
new Chapter 3 - Form Master.pdf
new Chapter 3 - Form Master.pdfnew Chapter 3 - Form Master.pdf
new Chapter 3 - Form Master.pdf
 
new Chapter 2 - New Project Visual Studio C#.pdf
new Chapter 2 - New Project Visual Studio C#.pdfnew Chapter 2 - New Project Visual Studio C#.pdf
new Chapter 2 - New Project Visual Studio C#.pdf
 
new Chapter 1 - Membuat Database.pdf
new Chapter 1 - Membuat Database.pdfnew Chapter 1 - Membuat Database.pdf
new Chapter 1 - Membuat Database.pdf
 
Slide Ngajar E-Filing cover.pdf
Slide Ngajar E-Filing cover.pdfSlide Ngajar E-Filing cover.pdf
Slide Ngajar E-Filing cover.pdf
 
e filing.pdf
e filing.pdfe filing.pdf
e filing.pdf
 
ELECTRONIC FILING (E-FILING).pdf
ELECTRONIC FILING (E-FILING).pdfELECTRONIC FILING (E-FILING).pdf
ELECTRONIC FILING (E-FILING).pdf
 
Materi Kearsipan Manual.pdf
Materi Kearsipan Manual.pdfMateri Kearsipan Manual.pdf
Materi Kearsipan Manual.pdf
 
PRAKTEK JOIN.pptx
PRAKTEK JOIN.pptxPRAKTEK JOIN.pptx
PRAKTEK JOIN.pptx
 
VIEW.pptx
VIEW.pptxVIEW.pptx
VIEW.pptx
 
JOIN.pptx
JOIN.pptxJOIN.pptx
JOIN.pptx
 
Fungsi Agregat.pptx
Fungsi Agregat.pptxFungsi Agregat.pptx
Fungsi Agregat.pptx
 
SELECT.pptx
SELECT.pptxSELECT.pptx
SELECT.pptx
 
Data Manipulation language (DML).pptx
Data Manipulation language (DML).pptxData Manipulation language (DML).pptx
Data Manipulation language (DML).pptx
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
Data Definition Language.pptx
Data Definition Language.pptxData Definition Language.pptx
Data Definition Language.pptx
 
Data, Tabel dan Pengantar SQL.pptx
Data, Tabel dan Pengantar SQL.pptxData, Tabel dan Pengantar SQL.pptx
Data, Tabel dan Pengantar SQL.pptx
 
Normalisasi.pptx
Normalisasi.pptxNormalisasi.pptx
Normalisasi.pptx
 
Key and Relationship Mapping.pptx
Key and Relationship Mapping.pptxKey and Relationship Mapping.pptx
Key and Relationship Mapping.pptx
 
ERDish.pptx
ERDish.pptxERDish.pptx
ERDish.pptx
 

Recently uploaded

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Praktikum PBO - encapsulation

  • 1. Universitas Teknokrat Indonesia OBJECT ORIENTED PROGRAMMING Chapter 6 - ENCAPSULATION - Yuri Rahmanto, S.Kom., M.Kom.
  • 2. Universitas Teknokrat Indonesia Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu, Kedaton, Bandar Lampung, Lampung 35132 Objectives Theory Conclusion Assignment ENCAPSULATION o Encapsulation is the technique of making the fields in a class private and providing access to the fields via public methods (INFORMATION HIDING & INTERFACE TO ACCESS DATA) o Encapsulation also can be described as a protective barrier that prevents the code and data being randomly accessed by other code defined outside the class.
  • 3. Universitas Teknokrat Indonesia Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu, Kedaton, Bandar Lampung, Lampung 35132 Objectives Theory Conclusion Assignment MODIFIER/VISIBILITY Modifier Class Package Sub Class All Class Private Y Default Y Y Protected Y Y Y Public Y Y Y Y
  • 4. Universitas Teknokrat Indonesia Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu, Kedaton, Bandar Lampung, Lampung 35132 Objectives Theory Conclusion Assignment Conclusion o Hiding the details of how the object works: The only part of the object that is accessible to the outside world is its behaviors. What happens inside those behaviors and how the state is stored is hidden from view.
  • 5. Universitas Teknokrat Indonesia Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu, Kedaton, Bandar Lampung, Lampung 35132 Objectives Theory Conclusion Assignment Assignment 1 Menampilkan data mahasiswa dari NPM dan Nama yang diinputkan (gunakan Scanner)
  • 6. Universitas Teknokrat Indonesia Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu, Kedaton, Bandar Lampung, Lampung 35132 Objectives Theory Conclusion Assignment Assignment 2 Lengkapi atribut (beserta method set n get) berupa alamat, no hp, email, Instagram
  • 7. Universitas Teknokrat Indonesia Jalan Zaenal Abidin Pagar Alam No 9-11, Labuhan Ratu, Kedaton, Bandar Lampung, Lampung 35132