#php #pemograman-berorientasi-objek-di-php #dasar-pemograman-berorientasi-objek-pbo-di-php
Petunjuk Diskusi
$kamera = new Handphone(); $tahun = new Hendphone(); public $layar_sentuh=true; public function __construct($kamera,$taun){ } public function ambil_photo(){ return "$this->kamera jepret..!!"; } $canggih =new Handphone("2 Megapixels", 2012); public $jadul=false; echo $canggih->ambil_photo();
0 jempol
rajiv
192
13
·
9 tahun, 1 bulan yang lalu
·
2 jempol
ini gan class Handphone { public $kamera; public $tahun; public $layar_sentuh = true; public function __construct($kamera,$tahun){ $this->kamera = $kamera; $this->tahun = $tahun; } public function ambil_photo() { return "$this->kamera jepret..!!"; } } $canggih = new Handphone("8 Megapixels","2013"); $jadul = new Handphone("2 Megapixels","2012"); $jadul->layar_sentuh = false; echo $canggih->ambil_photo();
isston
76
0
·
4 tahun, 5 bulan yang lalu
·
0 jempol
class Handphone{ public $kamera; public $tahun; public $layar_sentuh = true; public function __construct($kamera , $tahun){ $this->kamera = $kamera; $this->tahun = $tahun; } public function ambil_photo(){ return "$this->kamera jepret..!!"; } } $canggih = new Handphone("8 Megapixel", 2013); $jadul = new Handphone("2 Megapixel" , 2010); $jadul->layar_sentuh = false; echo $canggih->ambil_photo();
isston
76
0
·
4 tahun, 5 bulan yang lalu
·
0 jempol
Salah di megapixel harus di tambah s jadi megapixels
bastiar1807
180
0
·
3 tahun, 6 bulan yang lalu
·
0 jempol
class Handphone { public $kamera; public $tahun; public $layar_sentuh = true; public function __construct($kamera, $tahun) { $this->kamera = $kamera; $this->tahun = $tahun;} public function ambil_photo() { return "$this->kamera jepret..!!";} } $canggih = new Handphone("8 megapixel", 2013); $jadul = new Handphone("2 megapixel", 2012); $jadul->layar_sentuh = false; echo $canggih->ambil_photo(); KOK SAYA EROR TERUS YAH
OktavianNur
77
0
·
3 tahun, 2 bulan yang lalu
·
0 jempol
class Handphone { public $kamera; public $tahun; public $layar_sentuh = true; public function __construct($kamera,$tahun){ $this->kamera = $kamera; $this->tahun = $tahun; } public function ambil_photo() { return "$this->kamera jepret..!!"; } } $canggih = new Handphone("8 Megapixels","2013"); $jadul = new Handphone("2 Megapixels","2012"); $jadul->layar_sentuh = false; echo $canggih->ambil_photo();