-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhalo.php
More file actions
40 lines (31 loc) · 779 Bytes
/
Copy pathhalo.php
File metadata and controls
40 lines (31 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
class Siswa {
public function IsiNama($nama) {
echo "Nama : $nama <br>";
return $this;
}
public function IsiKelas($kelas) {
echo "Kelas : $kelas <br>";
return $this;
}
public function IsiJurusan($jurusan) {
echo "Jurusan : $jurusan a <br>";
return $this;
}
public function IsiNilai($nilai) {
echo "Nilai : $nilai <br>";
return $this;
}
public function IsiMapel($mapel) {
echo "Mapel : $mapel <br>";
return $this;
}
}
$siswa1 = new Siswa;
$siswa1->IsiNama("Alfarisi Azmir")
->IsiKelas("XI RPL 1")
->IsiJurusan("RPL")
->IsiNilai(100)
->IsiMapel("Matematika");
?>
// toloong buat method nya saya udh buat class nya