Pertemuan IX
Pertemuan IX
Pemrograman
Berorientasi Objek
Pertemuan IX
Konsep Class dan Implementasinya
1
14/06/2021
Atribut
Method
Class Diagram
3
Bagian-Bagian Class
Diagram
4
2
14/06/2021
• Sebuah class yg
menampung kumpulan
objek dari mahasiswa
• Atribut yg dimiliki: NIM,
Nama, dan Alamat
• Method: Melihat nilai
Contoh
5
class Mahasiswa {
var NIM = “”
var Nama = “”
var Alamat = “”
3
14/06/2021
Instansiasi Objek
7
Instansiasi Objek
8
4
14/06/2021
Contoh Program
(Method Tanpa Parameter)
Contoh Program
(Method Dengan Parameter)
10
5
14/06/2021
Static Method
11
Atribut
12
6
14/06/2021
Sintaks Atribut
13
Contoh Program
(Setter Method Saja)
14
7
14/06/2021
Contoh Program
(Getter Method Saja)
15
Contoh Program
(Getter dan Setter Method)
16
8
14/06/2021
Static Property
17
Tips
18